The Kingdom of Croatia (Croatian: Kraljevina Hrvatska; Latin: Regnum Croatiae), or Croatian Kingdom (Croatian: Hrvatsko Kraljevstvo), was a medieval kingdom in Southern Europe comprising most of what is today Croatia (without western Istria and some Dalmatian coastal cities), as well as most of the modern-day Bosnia and Herzegovina. The Croatian Kingdom was ruled for part of its existence by ethnic dynasties, and the Kingdom 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 Croatian language in the religious service was initially 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 Kreimir IV (10581074) and Demetrius Zvonimir (10751089).
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 rpd 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, with Croatia retaining 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 the Kingdom of Croatia and the Kingdom of Hungary from 1102 as a form of unequal personal union of two internally autonomous kingdoms united by a common Hungarian king.
Demetrius Zvonimir (Croatian: Dmitar Zvonimir, pronounced [dmîtar zʋônimiːr]; died 1089) was a King of Croatia and Dalmatia from 1076 until his death in 1089. He was crowned as king in Solin on 8 October 1076. Zvonimir also served as Ban of Croatia (1064–1074), and was named Duke of Croatia in around 1075. His native name was Zvonimir; he adopted the forename Demetrius at his coronation.
He first served as ban in the service of King Peter Krešimir IV. Afterwards, Peter Krešimir IV appointed him duke and declared him as his heir. In 1075, Demetrius Zvonimir succeeded to the Croatian throne through papal diplomacy. His reign is characterized as relatively peaceful, with no extensive war campaigns; he focused instead on Croatia's economic and cultural development. He inherited the Croatian state at its height and ruled from the city of Knin. Medieval legends allege his assassination; his death and succession are subjects of controversy in Croatian historiography. His reign was followed by a period of anarchy, which ended with the ascension of the Hungarian Árpád dynasty and the creation of a union with Hungary.