Bosnia and Herzegovina in the Middle Ages

The history of Bosnia and Herzegovina in the Middle Ages refers to the time period between the Roman era and the 15th-century Ottoman conquest. The Early Middle Ages in the Western Balkans saw the region reconquered from barbarians (Ostrogoths) by the Byzantine Emperor Justinian I ((r. 527 – 565)), followed by raids and migrations carried out by Slavic peoples in the 6th and 7th centuries. The first mention of a distinct Bosnian region comes from the 10th-century Byzantine text De Administrando Imperio. By the late 9th and early 10th century, Latin priests had Christianized much of Bosnia, with some areas remaining unconverted. In the High Middle Ages, Bosnia experienced economic stability and peace under the Ban Kulin who ruled over Banate of Bosnia from 1180 to 1204 and strengthened its ties with the Republic of Ragusa and with Venice. The Kingdom of Bosnia emerged in the Late Middle Ages (1377). The kingdom faced internal and external conflicts, eventually falling under Ottoman rule in the late 15th and early 16th centuries.

Early Middle Ages
The western Balkans had been reconquered from "barbarians" by Byzantine Emperor Justinian (r. 527–565). Sclaveni (Slavs) raided the Western Balkans, including Bosnia, in the 6th and 7th century. According to De Administrando Imperio written in the 10th century, these were followed by Croats and Serbs who arrived in the late 620s and early 630s, the Croats invited by Emperor Heraclius to fend off an invasion by the Pannonian Avars, and both had by this time settled West and East of Bosnia. Croats "settled in area roughly corresponding to modern Croatia, and probably also including most of Bosnia proper, apart from the eastern strip of the Drina valley" while Serbs "corresponding to modern south-western Serbia (later known as Raška), and gradually extended their rule into the territories of Duklja and Hum".

Early medieval polity
The De Administrando Imperio (DAI; ca. 960) mentions Bosnia (Βοσωνα/Bosona) as a "small/little land" (or "small country"), inhabited by Slavs along with Zahumlje and Travunija (both with territory in modern-day Bosnia and Herzegovina). This is the first mention of a distinct Bosnian region. Historians have established that the medieval Bosnian polity was situated, broadly, around the Bosna river, between its upper and the middle course: in the south to north direction between the line formed by its source and the Prača river in the south, and the line formed by the Drinjača river and the Krivaja river (from Olovo, downstream to town of Maglaj), and Vlašić mountain in the north, and in the west to east direction between the Rama-Vrbas line stretching from the Neretva to Pliva in the west, and the Drina in the east, which is a wider area of central and eastern modern-day Bosnia and Herzegovina.

By the late 9th and early 10th century, Bosnia was mostly Christianized by Latin priests from the Dalmatian coastal towns, though remote pockets remained unreached. If DAI's kastra oikoumena does not designate inhabited towns, but ecclesiastical centers instead, the existence of such centers could be evidence it was an independent state before 822, as theorized by late Tibor Živković. After the East–West Schism (1054) the bishopric of Bosnia was Roman Catholic under jurisdiction of the Archbishop of Split (since the 12th century under Roman Catholic Diocese of Dubrovnik).

Northern and Northeastern Bosnia was captured by Carolingian Franks in the early 9th century and remained under their jurisdiction until 870s. In what is now eastern Herzegovina and Montenegro, semi-independent localities emerged under Serbian rule. In the 910s Petar of Serbia annexed entire Eastern Bosnia by defeating local Slavic lord Tišemir of Bosnia, and pushing into Zahumlje came into conflict with Michael of Zahumlje. Croatian king Tomislav reintegrated parts of Western and Northern Bosnia, battling the Bulgarians in the Bosnian highlands (926). In 949, a civil war broke out in Croatia leading to the conquest of Bosnia by Časlav, but after his death in 960s, it was retaken by Michael Krešimir II of Croatia. Additionally, Duklja absorbed Zahumlje under John Vladmir. In 1019 Byzantine Emperor Basil II forced the Serb and Croat rulers to acknowledge Byzantine sovereignty, though this had little impact over the governance of Bosnia until the end of the 11th century, for periods of time being governed by Croats or Serbs to the East. A later political link to Croatia will be observed "by the Croatian title ban from the earliest times".

Based on semi-mythological Chronicle of the Priest of Duklja (13th century), according to some scholars the earliest known ruler of Bosnia was Ratimir in 838 AD. According to later Annales Ragusini (14-17th century ), the death of childless Stiepan in 871 was followed by 17 years war which was ended by Croatian ruler Bereslav's conquest of Bosnia, while in 972 Bosnian ruler was killed and land conquered by certain ''Sigr. Ducha d'Albania, but another ruler of the lineage of Moravia de Harvati and related to previous Bosnian ruler, expelled Sigr. Ducha'' and united Bosnia.

Regarding the question about ethnic identity of the inhabitants of Bosnia before 1180, Noel Malcolm concludes that "it cannot be answered, for two reasons: (f)irst, because we lack evidence, and secondly, because the question lacks meaning", and that only certainty "that one can sensibly say about the ethnic identity of the Bosnians is this: they were the Slavs who lived in Bosnia".

Relations with neighbors and consolidation
Serbian princess ruled in Zahumlje, and later, after integrating with Raška in the 1070s under Constantine Bodin, expanded to conquer all of eastern Bosnia in the 1080s. His kingdom collapsed after his death in 1102. Hungarian authority fell over Bosnia in 1102, though it was ruled through a Ban, who became more independent as the century progressed. In the 1150s, Ban Borić, the first Bosnian ban known in historiography by name, led the Bosnian troops to aid Hungary against the Byzantines in Belgrade, as an ally. By 1180, Bosnia was functionally fully independent, though Hungarians seldom missed to lay the claim on it. Some attempts to reunite Bosnia and Duklja were made, especially by king Kočopar of Duklja (1102–1103) who forged an alliance with Bosnia against Rascia and Zahumlje, but attempt utterly failed with Kočopar's death. Since the early middle ages, it is noted that some Hungarian monarchs included "rex Ramae" into their title, taking a name of a small župa of Rama (central Bosnia and Herzegovina), likely referring to all of Bosnia, and thus indicating its de facto independence. In 1167 Byzantium defeated Hungary at the Battle of Zemun and took all of Bosnia under its domain and would remain there until Manuel I Comnenus died in 1180.

Banate
With Croatia acquired by the Hungarian Kingdom, and the Serbian state in a period of stagnation, control over Bosnia was subsequently contested between the Kingdom of Hungary and the Byzantine empire. In 1154, Borić was appointed ban by pro-Hungarian nobility. Under the pressure of the Byzantines, a subsequent King of Hungary appointed Kulin as a Ban to rule the province under the eastern vassalage. However, this vassalage was largely nominal. Kulin's nearly three decades of rule over the country was characterized by economic stability and peace, during which he strengthened Bosnia's economic ties with Dubrovnik in 1189 and Venice through treaties and trade agreements. His sister married the ruler of Hum, Miroslav brother of Stephan Namanja, founder of the Nemanjić dynasty, with whom he also established a positive diplomatic relationship. However, he had poor relations with Hungary and her ally Zeta for religiopolitical reasons. His rule also marked the start of a controversy with the Bosnian Church, an indigenous Christian sect considered heretical by both the Roman Catholic and Eastern Orthodox churches. In response to Hungarian attempts to use church politics regarding the issue as a way to reclaim sovereignty over Bosnia, Kulin held a council of local church leaders to renounce the heresy in 1203. Despite this, Hungarian ambitions remained unchanged long after Kulin's death in 1204, waning only after an unsuccessful invasion in 1254. Miroslav died in 1198 and Andrew, brother of the King of Hungary and appointed by him to be duke of Croatia and Dalmatia as well as Hum, jumped at the opportunity. He took northwestern Hum after defeating a local force but he withdrew in 1203 either because his brother, King Emeric, declared war on him or he was pushed out by Peter. Peter was chosen by the local nobles of Hum to succeed Miroslav and was likely his son. He soon ousted a brother named Andrew from Eastern Hum, but Stefan the First-Crowned sided with the exiled Andrew and returned Hum to the Neretva in 1216, and Andrew became a puppet prince of Hum. He was later removed by Stefan and replaced by a governor, possibly his son, Stefan Radoslav. This meant Andrew only had Popovo and the coastline remaining, and by 1218, Peter had taken it and Andrew had disappeared. The Pope called for Hungary to crusade against heretics in Bosnia in 1225, and the call was met a decade later. It is likely that Hungary was putting political pressure on the papacy to invade Bosnia for territorial gain, as there is no concrete proof of Bosnian heresy at this time, just ignorance of certain catholic practices. Hungary invaded starting in 1235 and reached Bosnia in 1238, when they captured Vrhbosna. In 1241 they retreated back to Hungary when it came under threat of the Tartars. The commander of the crusaders, Koloman, brother of the king, was slaughtered by the Tartars along with his army at Sajó river on April 11, 1241, thus allowing the Bosnian Ban, prince of Split Matej Ninoslav to regain control of all Bosnia. With the death of the Great Khan, the Tartars returned to Karakorum, pillaging along the way. They circumnavigated Bosnia, so its leaders had time to reassert power without interference or outside threat.

Kingdom of Bosnia
In the 1280s a minor noble from northern Bosnia named Stephan Kotroman married the daughter of Stefan Dragutin, son-in-law to the King of Hungary. The ruler of Mačva gained control of northern Bosnia, under the supervision of the Croatian Šubić family who were eventually ousted from power during a war with Venice over the town of Zadar. His son, Stjepan II Kotromanić became Ban of Bosnia in 1322. He took parts of Croatia and the Dalmatian coast between his ascension and 1326, when he annexed Hum. He signed peace treaties with Ragusa in 1334 and Venice in 1335. He died in 1353 and his nephew, Stephen Tvrtko, succeeded him at age 15. Stjepan II had not properly consolidated his banate, so when he died, his state fractured as the nobles felt no obligation to young Tvrtko I. Just before Kotromanić died, he had married his daughter, Elizabeth, to Louis, King of Hungary, which gave Louis the excuse to demand the rich lands of Hum from Tvrtko. Having no real support from his nobles, Tvrtko submitted to the King's demands and in 1357, Hungary regained its territory in Hum. In 1363, war broke out between the two kings. Louis invaded the northern provinces, which were divided in loyalty between the two kings. An ally of Tvrtko, Vukac Hrvatinić defended Sokograd and a month later, repelled a second invasion at Srebrnik in Usora. In 1366, his nobles expelled him and Tvrtko fled to the court of Hungary, which surprisingly accepted him. The revolting nobles plopped Tvrtko's brother, Vuk, on the throne. Tvrtko was soon back in Bosnia with troops from Hungary to take back his realm, and by the end of the year Vuk was exiled and Tvrtko was back on the throne. After the death of Stefan Dušan and the collapse of his Serbian empire, competing factions tried to carve their own chunks of territory from it. Lazar Hrebljanović received troops from Tvrtko, and thus gave some of the spoils and land to him. In 1377 Tvrtko I crowned himself King of Bosnia.

In 1388 an Ottoman raiding party was wiped out in Hum by a local noble named Vlatko Vuković, who was later sent along with a Bosnian army to help Lazar at the Battle of Kosovo Polje. After Tvrtko's death in 1391, the kingship was severely weakened by local nobles vying for power, though the kingdom did not splinter. In 1404 King Ostoja was ousted by the nobles and replaced by the illegitimate son of Tvrtko, Tvrtko II. Ostoja returned with a Hungarian army and retook part of the country, and for ten years slowly regained authority in Bosnia. In 1414 the Ottomans declared the ousted Tvrtko II the rightful king of Bosnia and invaded. A year later, the Ottomans won a decisive battle against the Hungarian and Bosnian forces under Ostoja with the aid of a powerful Bosnian nobleman called Hrvoje. They agreed to keep Ostoja on the throne, but the king of Bosnia would never again be outside of the Turkish sphere of influence. In 1418 Ostoja died and his son was exiled two years later by Tvrtko II. War over the mining district of Srebrenica.

Between 1433 and 1435 southern parts of central Bosnia was taken from the Hungarians by the Turks with the help of Stephen Vulkčić, Sandalj's nephew and lord of Hum. Turks seized Srebrenica in 1440. Tvrtko II died in 1443. Three year civil war between Stephen Vukčić and Tvrtko II's successor, Stephen Tomaš. War ended when they came to an agreement but Vukčić still supported the Serbian ruler George Brancović, a semi independent vassal of the Ottoman Turks who was contesting the Bosnian king for Srebrenica. In the early 1450s Vukčić became embroiled in a civil war with Ragusa and his eldest son. 1461, Stephen Tomaš died and his son Stephan Tomašević ascended to the throne. He quickly asked Pope Pius II for help, and again in 1463 against the looming threat of Ottoman invasion. No help came, and Mehmet the Conqueror's invading army took the stronghold of Bobovac. Stephan Tomašević fled north to Jajce and then to the nearby fortress of Ključ where he was besieged, captured, and beheaded. The main Ottoman army withdrew in the fall of that year, only leaving scant garrisons to guard what they had conquered. King Matthias of Hungary then invaded and took parts of northern and northwestern Bosnia by besieging and taking both Jajce and the nearby fortress of Zvečaj. Matthias created a Bannate loyal to him and renamed the Ban, King of Bosnia in 1471. The kingdom's territory was soon smashed to almost nothing by the returning Turks. In 1526, the Turks obliterated the Hungarians at the Battle of Mohács and year later took Jajce, finally crushing the last hold out of Hungary in Bosnia. Vulkčić reclaimed his kingdom after the Turks withdrew, but lost it again two years later, staking out in the port town of Novi, where he died in 1466. He was succeeded by his son Vlatko who tried to gain help from Venice and Hungary but to no avail. The last fortress in Hum was taken in 1482.

Trading centers

 * Drijeva
 * Podvisoki, 14th-15th c.
 * Doboj
 * Foča (at the time "Hoča")

Fortifications

 * Blagaj Fort, 10th–15th c.
 * Bobovac, 14th–15th c.
 * Borač, 15th c.
 * Bužim Fort, 12th–15th c.
 * Doboj Fortress, 13th–15th c.
 * Glamoč Fortress, 14th c.–?
 * Hodidjed, –15th c.
 * Jajce Fortress, 14th c.–?
 * Komotin Fort, 14th c.–?
 * Maglaj Fortress, 14th c.–?
 * Visoko, 14th c.–1503
 * Srebrenik Fortress, 14th c.–?
 * Zvornik Fortress, 13th c.–?

Religious buildings
Places of worship built before Ottoman conquest of medieval Bosnian Kingdom and abolition of the state in 1463.

Orthodox

 * Dobrićevo Monastery
 * Dobrun Monastery
 * Sase Monastery

Catholic

 * Kraljeva Sutjeska Monastery
 * St. Mary's Church
 * St. Nikola Church (ruins)

Islamic

 * Fethija (1266/1592)
 * Emperor's Mosque (1457)
 * Mehmed II Fatih Mosque in Kraljeva Sutjeska (1463)
 * Šerefudin's White Mosque (1477/1980)
 * Dživar Mosque, Trebinje (1512)
 * Sultan-Sulejmanova Mosque, Blagaj (1520)
 * Muslihudin Čekrekčija Mosque (1526)