Bosnia, in the Early Middle Ages to early High Middle Ages was territorially and politically defined entity, governed at first by knyaz and then by a ruler with the ban title, from at least 838 AD. Situated, broadly, around the Bosna river, between its upper and the middle course, which is a wider area of central and eastern modern-day Bosnia and Herzegovina. The first mention of Bosnia as an independent entity is 838 AD, with a knyaz Ratimir as its ruler.
Geography
The early Bosnia, according to Vego and Mrgić, as well as Hadžijahić and Anđelić, 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, 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. Confirmation of its emergence and territorial distribution comes from historiographical interpretation of Bar's Chronicle in modern and post-modern scholarship, which situate the state around the Upper Bosna river and the Upper Vrbas river, including Uskoplje, Pliva and Luka. This also suggest that this distribution from the Bosna river valley into the Vrbas river valley is the earliest recorded. These three small parishes will later become a quintessence for emergence of Donji Kraji county, before they were reclaimed as Kotromanić's demesne, after 1416 and death of Hrvoje Vukčić.
History
The western Balkans had been reconquered from "barbarians" by Byzantine Emperor Justinian. Sclaveni raided the western Balkans, including Bosnia, in the 6th century. The De Administrando Imperio mentions Bosnia as a "small/little land", in the upper course of Bosna river, settled by Slavs who in time created their own unit with a ruler calling himself a Bosnian. Also, Serbs settled in south, in Zahumlje and Travunija ; it was referred to only once, at the end of the 32nd chapter on the Serbs. This is the first mention of a Bosnian entity; at the time it was a geographic, not a national, entity. In the Early Middle Ages, Fine, Jr. believes that what is today western Bosnia and Herzegovina was part of Croatia, while the east was Serbian, although, the harsh and usually inaccessible elevated terrains of Upper Bosnia was most likely never under direct control of either of the two Slavic states, but more under its own political rule. This claim is reinforced by the Byzantine writer Cinnamus, who wrote: Historical and archaeological information on early medieval Bosnia is inadequate. Bosnia included two inhabited towns according to DAI, Katera and Desnik. Katera has been identified as Kotorac near Sarajevo, however, according to archaeology refutes this; it may have been Kotor Varoš, although it only includes late medieval findings to date. Desnik remains unidentified, but was thought to be near Dešanj. If DAI's kastra oikoumena does not designate inhabited towns, but ecclesiastical centres, the towns might be Bistua and Martar. Expert historians have established that the medieval Bosnian polity stretched from the Sarajevo field in the south to the Zenica field in the north, the eastern boundary being the Prača valley towards the Drina, the western along the Lepenica and Lašva valleys. Nucleus where first state had developed is believed to be in Visoko valley.. After the death of Serbian ruler that conquered territories Časlav, land of Bosnia detached from the Serbian state, together with Raška, Travunija, Zahumlje and Paganija, became politically separated. Bulgaria briefly subjugated Bosnia at the turn of the 10th century, after which followed period of Byzantine rule. In the 11th century, Bosnia was briefly part of the state of Duklja. At the end of 12th century, the Banate of Bosnia emerged under its first ruler Ban Borić. After Ban Kulin Bosnia was by practical means an independent state, but that was constantly challenged by Hungarian kings who tried to reestablish its authority.