"Duchy of Croatia" (Croatian: Kneževina Hrvatska; also "Duchy of the Croats", Kneževina Hrvata; "Dalmatian Croatia", Dalmatinska Hrvatska; "Littoral Croatia", Primorska Hrvatska; Greek: Χρωβατία, Chrovatía), was a medieval Croatian duchy that was established in the former Roman province of Dalmatia. Throughout its time it had several seats, namely Klis, Solin, Knin, Biaći and Nin, comprised the littoral, or coastal part of today's Croatia and included a big part of the mountainous hinterland. The Duchy was in the center of competition between the Carolingian Empire and the Byzantine Empire for rule over the area. Rivalry with Venice emerged in the first decades of the 9th century and was to continue for the following centuries. Croatia also waged battles with the Bulgarian Empire, with whom the relations improved greatly afterwards, and the Arabs and sought to extend its control over important coastal cities under the rule of Byzantium. Croatia experienced periods of vassalage of the Franks or Byzantines and de facto independence until 879, when Croatian Duke Branimir received recognition from Pope John VIII as an independent realm. The ruling dynasty of Croatia was the House of Trpimirović, with interruptions by the House of Domagojević (864-878 and 879-c. 892). The Duchy existed until around 925 when, during the rule of Duke Tomislav, Croatia became a kingdom.
The Kingdom of Croatia (Latin: Regnum Croatiae; Croatian: Kraljevina Hrvatska, Hrvatsko Kraljevstvo) existed as a sovereign state for nearly two centuries. Its existence was characterized by various conflicts and periods of peace or alliance with the Bulgarians, Byzantines, Hungarians, and competition with Venice for control over the eastern Adriatic coast. The goal of promoting the Slavic language in the religious service was initially brought and introduced by the 10th century bishop Gregory of Nin, which resulted in a conflict with the Pope, later to be put down by him. In the second half of the 11th century Croatia managed to secure most coastal cities of Dalmatia with the collapse of Byzantine control over them. During this time the kingdom reached its peak under the rule of kings Peter Krešimir IV (1058-1074) and Demetrius Zvonimir (1075-1089).
The state was ruled mostly by the Trpimirović dynasty until 1091. At that point the realm experienced a succession crisis and after a decade of conflicts for the throne and the aftermath of the Battle of Gvozd Mountain, the crown passed to the Árpád dynasty with the coronation of King Coloman of Hungary as "King of Croatia and Dalmatia" in Biograd in 1102, uniting the two kingdoms under one crown. The precise terms of the relationship between the two realms became a matter of dispute in the 19th century. The nature of the relationship varied through time, Croatia retained a large degree of internal autonomy overall, while the real power rested in the hands of the local nobility. Modern Croatian and Hungarian historiographies mostly view the relations between Kingdom of Croatia and Kingdom of Hungary from 1102 as a form of a personal union of two internally autonomous kingdoms united by a common king.