Croatian–Bulgarian wars

The Croatian–Bulgarian Wars were a series of conflicts that erupted three times during the 9th and 10th centuries between the medieval realms of Croatia and Bulgaria. During these wars, Croatia formed alliances with Eastern Francia and Byzantium against the Bulgarian Empire.

First war
During the middle of the 9th century, Bulgaria was the dominant power in the central, eastern, and northern Balkans. In 854, the Bulgarian ruler Boris I forged an official alliance with the Moravian prince Rastislav against Louis the German of East Francia. Duke Trpimir of Croatia was a faithful Frankish vassal and was wary of Bulgaria's ongoing expansion when it reached Croatian borders after the wars against Rascia. Bulgaria is said to have invaded Croatia in approximately 854, but there is also a possibility that King Louis gave some compensation to Trpimir to attack Bulgaria. During the war of 854, there was only one great battle on the territory of present-day northeastern Bosnia, and neither side emerged victorious. Soon afterward, peace negotiations began between Boris of Bulgaria and Trpimir of Croatia, resulting in gifts exchanged and the establishment of peace, with the border between the Croatian Duchy and Bulgaria stabilized at the river of Drina (between modern-day Bosnia and Herzegovina and Republic of Serbia).

Second war
A very long and arduous war was prosecuted between the Bulgarian Tsar Simeon I, who wanted to take over the Byzantine Empire, and the Empire's monarch Romanos I. Under heavy pressure from the Bulgarians and amassing defeat after defeat, the Byzantine Empire negotiated with Serbia and Croatia in an effort to forge an alliance against the Bulgarians. Having been informed of these plans by Prince Michael of Zachlumia, who was forced to the islands as the Serbian rulers took direct control most of his local lands for themselves, Simeon overran Serbia in 924,  destroyed it by tricking its nobility, and made it directly part of the Bulgarian Empire. Serbia's ruler Zaharija Pribislavljević fled and found exile at the Croatian court, while after the realm's destruction massive waves of Serb refugees fled and found refuge in Tomislav's Croatia. Trying to gain Croatian entry into this coalition, Romanos I ordered the province of Dalmatia in ca. 925 to pay taxes not to Byzantium but rather to the Croatian state; the Dalmatian territories, including most cities and the northern islands, were henceforth administered by King Tomislav and were to remain under Croatia. The Serbs of Zahumlje, allied with Croatia and Prince Michael, became vassals of Tomislav some time before 926. Tsar Simeon sent Duke Alogobotur to drive the Serb refugees further into Croatia, causing outright war in ca. 926.

The climax of the war was the Battle of the Bosnian Highlands that same year, when Croatian forces under the command of King Tomislav completely defeated the Bulgarian forces under the command of Alogobotur, killing most of the Bulgarians in the battle. The Croatian victory was so decisive and the battle so big that contemporary sources greatly overestimated Croatia's Army at 160,000 men, with a slightly bigger force on the Bulgarian side. This was the only battle Tsar Simeon ever lost. Since both rulers maintained good relations with Pope John X, the pope was able to negotiate an end to the war soon afterward without any further border changes. Although the eastern border was extended down to the river of Bosnia, the Croatian realm was greatly strengthened both militarily and in natural resources: it emerged from the war as one of the most modern realms of the period and was able to consolidate a moderately sized navy. On the same day as the battle Simeon died in Preslav and his successor Peter I faced internal difficulties and revolts by his brothers Michail and Ivan. The Serbs were able to take advantage of this situation and many of them returned by 931 to their homes in the renewed Serbian realm, thus terminating Croatia's short-lived Bulgarian neighbor at the east.

Third war
In the second half of the 10th century, the Croatian realm was ruled by Stjepan Držislav. Stjepan formed an alliance with the Byzantine Empire, which in turn recognized him as the King of his lands. After his death in 997, his son Svetoslav Suronja continued his pro-Byzantine policy. His brothers Krešimir III and Gojslav did not want Svetoslav as ruler and attempted a coup d'etat, asking the Bulgarian tsar Samuil for help. Answering their call, Samuil went on a rampage in 998 and razed the Dalmatian cities of Trogir and Split, but he was stopped at the siege of Zadar. The Bulgarian forces then returned home, using the Bosnian route. Territory taken by Samuil during the war was given to Krešimir III and Gojslav, who, with further Bulgarian support, won the Croatian civil war and took over the realm in the year 1000. Svetoslav Suronja, a Byzantine and Venetian ally, was sent to exile in Venice, but after a change in government there he was exiled to Hungary. Following the death of Ivan Vladislav in 1018, Bulgaria fell under Byzantine rule, and Krešimir III and Gojslav, the two Croatian kings, became Byzantine vassals.