Croatia eventually became a strong independent kingdom under king Tomislav in 925, but in 1102 the Croatians ended a decade-long dynastic struggle by agreeing to submit themselves to Hungarian authority.
By the mid-1400s, the Hungarian kingdom was gravely hurt by the Ottoman expansion as much of the mountainous country now known as Bosnia and Herzegovina fell to the Turks. At the same time, Dalmatia became mostly Venetian. Dubrovnik was a city-state that was firstly Byzantine (Roman) and Venetian, but later, unlike other Dalmatian city-states, it became independent as Republic of Dubrovnik, even if it was often under the suzerainty of neighboring powers.
The Battle of Mohács in 1526 led the Croatian Parliament to invite the Habsburgs, under Ferdinand I, to assume control over Croatia. Habsburg rule eventually did prove to be successful in thwarting the Ottomans, and by the 18th century, much of Croatia was free of Turkish control. The odd crescent shape of the Croatian lands remained as a mark, more or less, of the frontier to the Ottoman advance into Europe. Istria, Dalmatia and Dubrovnik all eventually passed to the Habsburg Monarchy between 1797 and 1815.
Following World War I and the demise of Austria-Hungary, Croatia joined the Kingdom of Serbs, Croats and Slovenes (which became Yugoslavia in 1929). Yugoslavia was invaded during World War II and Croatia was turned into a fascist puppet-state named the Independent State of Croatia. After the defeat of the Axis powers, Yugoslavia became a federal socialist state under the strong hand of Josip Broz Tito.
Although Croatia declared its independence from Yugoslavia in 1991,