 Wars with Magyars and Pechenegs and the spread of the Bogomil heresy weakened Bulgaria after Simeon 's death . Consecutive Rus ' and Byzantine invasions resulted in the seizure of the capital Preslav by the Byzantine army in 971 . Under Samuil , Bulgaria briefly recovered from these attacks , but this rise ended when Byzantine emperor Basil II defeated the Bulgarian army at Klyuch in 1014 . Samuil died shortly after the battle , and by 1018 the Byzantines had ended the First Bulgarian Empire . 
