This article has multiple issues. Please help talk page. (Learn how and when to remove these template messages)( or discuss these issues on the Learn how and when to remove this template message)
At the beginning of the 7th century the first waves of Slavs had settled in Bosnia, along the Drina, Bosna and Vrbas rivers to the Adriatic coast. These were followed by Serbs and Croats who arrived in the late 620s and early 630s, invited by Emperor Heraclius to fend off an invasion by the Pannonian Avars, who had by this time settled western parts of Bosnia. By the 9th century, Bosnia was mostly Christianized by Latin priests from the Dalmatian coastal towns, though remote pockets remained unreached. 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. Peter Gojnikovi? 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 Bosnia to roughly the same territorial extent as the Franks had held half a century earlier in the early 900s. In 949, a civil war broke out in Croatia leading to the conquest of Bosnia by ?aslav, but after his death in 960, it was retaken by Kresimir 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. Northeastern Bosnia was given to the king of Hungary and Croatia by Ra?ka in 1030 as part of a dowry between Bella II and the daughter of Uro? I, Jelena. In 1042, the Byzantines amassed a large coalition, which included the ruler of Bosnia and the prince of Zahumlje, against the ruler of Duklja, Stefan Vojislav. Vojislav soundly defeated this coalition and went on to annex Zahumlje.
During this period Bosnia is already territorially and politically defined entity, governed by a ban, from at least 838 AD. The De Administrando Imperio (DAI; ca. 960) mentions Bosnia (/Bosona) as a "small/little land" (or "small country"), inhabited by Serbs 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. In the Early Middle Ages, it is believed that what is today central and western Bosnia and Herzegovina was part of Croatia, while the rest was divided between Croatia and Serbia.
Serbian princes 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, Croatian-bornBan Bori? led Bosnian troops to aid Hungary against the Byzantines in Belgrade. By 1180, Bosnia was functionally fully independent, though it was laid claim to by the kingdom of Hungary and Croatia. 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. After Croatia entered a personal union with the Hungarian kingdom in 1102, most of Bosnia became vassal to Hungary as well. Since the Council at Ostrogon 1138, King Bela II of Hungary and Croatia included "rex Ramae" into his title, taking a name of a small county of Rama (central Bosnia and Herzegovina), likely referring to all of Bosnia. 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.
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, Hungary appointed the croatian nobleman Ban Bori? from Slavonia as the first ruler and Viceroy of Bosnia. Under the pressure of the Byzantine, a subsequent King of Hungary appointed Kulin as a Ban to rule the province under the eastern vassalage. However, this vassalage was largely nominal.
The second Bosnian ruler, Croatian-bornBan Kulin, allegedly presided over nearly three decades of peace and stability during which he strengthened the country's economy through treaties with Dubrovnik in 1189 and Venice. 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. Minoslav 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 Irme, 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.
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, Vlkac 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. Tvrkto II died in 1443. 3 year civil war between Sephen Vulk?i? and Tvrkto II's successor, Stephen Toma?. War ended when they came to an agreement but Vulk?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 Vulk?i? became embroiled in a civil war with Ragusa and his eldest son. 1461, 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.
Places of worship built before Ottoman conquest of medieval Bosnian Kingdom and abolition of the state in 1463.
Knez Ratimir bi bio prvi poznati knez na podru?ju Bosne kao samostalne oblasti.
Vladavina Bladinova nasljednika Ratimira mo?e se datirati u 838. godinu.