Samuel (also Samuil; , ; , ; Old Church Slavonic: Самоилъ; died October 6, 1014) was the Tsar (Emperor) of the First Bulgarian Empire from 997 to 6 October 1014. From 977 to 997, he was a general under Roman I of Bulgaria, the second surviving son of Emperor Peter I of Bulgaria, and co-ruled with him, as Roman bestowed upon him the command of the army and the effective royal authority. As Samuel struggled to preserve his country's independence from the Byzantine Empire, his rule was characterized by constant warfare against the Byzantines and their equally ambitious ruler Basil II. In his early years Samuel managed to inflict several major defeats on the Byzantines and to launch offensive campaigns into their territory. In the late 10th century, the Bulgarian armies conquered the Serb principality of Duklja and led campaigns against the Kingdoms of Croatia and Hungary. But from 1001, he was forced mainly to defend the Empire against the superior Byzantine armies. Samuel died of a heart attack on 6 October 1014, two months after the catastrophic battle of Kleidion. His successors failed to organize a resistance, and in 1018, four years after Samuel's death, the country capitulated, ending the five decades-long Byzantine–Bulgarian conflict. Samuel was considered "invincible in power and unsurpassable in strength". Similar comments were made even in Constantinople, where John Kyriotes penned a poem offering a punning comparison between the Bulgarian Emperor and Halley's comet, which appeared in 989. During Samuel's reign, Bulgaria gained control of most of the Balkans (with the notable exception of Thrace) as far as southern Greece. He moved the capital from Skopje to Ohrid, which had been the cultural and military centre of southwestern Bulgaria since Boris I's rule, and made the city the seat of the Bulgarian Patriarchate. Because of this, his realm is sometimes called the Western Bulgarian Empire. Samuel's energetic reign restored Bulgarian might on the Balkans, even though the Empire was disestablished after his death. The rise of the Cometopuli The Cometopuli Samuel was the fourth and youngest son of count Nicholas, a Bulgarian noble, who might have been the count of Sredets district (modern-day Sofia), although other sources suggest that he was a regional count of Prespa district in the region of Macedonia. His mother was Rhipsime of Armenia. The actual name of the dynasty is not known. Cometopuli is the nickname used by Byzantine historians