Croatia, officially the Republic of Croatia, is a country at the crossroads of Central and Southeast Europe on the Adriatic Sea. It borders Slovenia to the northwest, Hungary to the northeast, Serbia to the east, Bosnia and Herzegovina and Montenegro to the southeast, and shares a maritime border with Italy to the west and southwest. Its capital and largest city, Zagreb, forms one of the country's primary subdivisions, with twenty counties. Croatia has an area of 56,594 square kilometres and a population of 4.07 million.
The Croats arrived in the 6th century and organised the territory into two duchies by the 9th century. Croatia was first internationally recognised as independent on 7 June 879 during the reign of Duke Branimir. Tomislav became the first king by 925, elevating Croatia to the status of a kingdom. During the succession crisis after the Trpimirović dynasty ended, Croatia entered a personal union with Hungary in 1102. In 1527, faced with Ottoman conquest, the Croatian Parliament elected Ferdinand I of Austria to the Croatian throne.