Croatia (, ; Hrvatska, ), officially the Republic of Croatia (Republika Hrvatska, ), 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, sharing a maritime border with Italy. Its capital, Zagreb, forms one of the country's primary subdivisions, along with twenty counties. Croatia has an area of 56594 km2 and a population of 4.28 million, most of whom are Roman Catholics.
Inhabited since the Paleolithic Age, the Croats arrived in the area in the 6th century and organised the territory into two duchies by the 9th century. Croatia was first internationally recognized as an independent state 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, which retained its sovereignty for nearly two centuries. 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. In October 1918, in the final days of World War I, the State of Slovenes, Croats and Serbs, independent from Austria-Hungary, was proclaimed in Zagreb, and in December 1918 it was merged into the Kingdom of Serbs, Croats and Slovenes.
Following the Axis invasion of Yugoslavia in April 1941, most of the Croatian territory was incorporated into the Nazi-backed client-state which led to the development of a resistance movement and the creation of the Federal State of Croatia which after the war become a founding member and a federal constituent of the Socialist Federal Republic of Yugoslavia. On 25 June 1991, Croatia declared independence, which came wholly into effect on 8 October of the same year. The Croatian War of Independence was fought successfully for four years following the declaration.
The sovereign state of Croatia is a republic governed under a parliamentary system and a developed country with a very high standard of living. It is a member of the European Union (EU), the United Nations (UN), the Council of Europe, NATO, the World Trade Organization (WTO), and a founding member of the Union for the Mediterranean. As an active participant in the UN peacekeeping forces, Croatia has contributed troops to the NATO-led mission in Afghanistan and took a non-permanent seat on the UN Security Council for the 2008–2009 term. Since 2000, the Croatian government has constantly invested in infrastructure, especially transport routes and facilities along the Pan-European corridors.
Croatia's economy is dominated by service and industrial sectors and agriculture. Tourism is a significant source of revenue, with Croatia ranked among the top 20 most popular tourist destinations in the world. The state controls a part of the economy, with substantial government expenditure. The European Union is Croatia's most important trading partner. Croatia provides a social security, universal health care system, and a tuition-free primary and secondary education, while supporting culture through numerous public institutions and corporate investments in media and publishing.
The name of Croatia derives from Medieval Latin Croātia. Itself a derivation of North-West Slavic *Xrovat-, by liquid metathesis from Common Slavic period *Xorvat, from proposed Proto-Slavic *Xъrvátъ which possibly comes from Old Persian *xaraxwat-. The word is attested by the Old Iranian toponym Harahvait- which is the native name of Arachosia.
The origin of the name is uncertain, but is thought to be a Gothic or Indo-Aryan term assigned to a Slavic tribe. The oldest preserved record of the Croatian ethnonym *xъrvatъ is of variable stem, attested in the Baška tablet in style zvъnъmirъ kralъ xrъvatъskъ ("Zvonimir, Croatian king").
The first attestation of the Latin term is attributed to a charter of Duke Trpimir from the year 852. The original is lost, and just a 1568 copy is preserved, leading to doubts over the authenticity of the claim. The oldest preserved stone inscription is the 9th-century Branimir Inscription found near Benkovac, where Duke Branimir is styled Dux Cruatorvm. The inscription is not believed to be dated accurately, but is likely to be from during the period of 879–892, during Branimir's rule.