Croatia, at one time the Roman province of Pannonia, was settled in the 7th century by the Croats, who converted to Christianity between the 7th and 9th centuries and adopted the Roman alphabet under the suzerainty of Charlemagne. In 925, the Croats defeated Byzantine and Frankish invaders and established their own independent kingdom, which reached its peak during the 11th century. A civil war ensued in 1089, which later led to the country being conquered by the Hungarians in 1091. The signing of the Pacta Conventa by Croatian tribal chiefs and the Hungarian king in 1102 united the two nations politically under the Hungarian monarch, but Croatia retained its autonomy.
Following the defeat of the Hungarians by the Turks at the battle of Mohács in 1526, Croatia (along with Hungary) elected Austrian archduke Ferdinand of Hapsburg as their king. After the establishment of the Austro-Hungarian kingdom in 1867, Croatia became part of Hungary until the collapse of Austria-Hungary in 1918 following its defeat in World War I. On Oct. 29, 1918, Croatia proclaimed its independence and joined in union with Montenegro, Serbia, and Slovenia to form the Kingdom of Serbs, Croats, and Slovenes. The name was changed to Yugoslavia in 1929.
After World War II in 1945, Croatia was made into a republic of the newly reconstituted Communist nation of Yugoslavia; however, Croatian nationalism persisted. In June 1991. the Croatian parliament passed a declaration of independence from Yugoslavia and after winning the war that broke out, Croatia became an independant country.