The Republic of Slovenia (Slovenian: Republika Slovenija) is a coastal sub-Alpine country in southern Central Europe bordering Italy to the west, the Adriatic Sea to the southwest, Croatia to the south and east, Hungary to the northeast, and Austria to the north.
Slovenia was part of Yugoslavia from 1945 until gaining independence in 1991. It became a member of the European Union on 1 May 2004. It is also a member of the Council of Europe, NATO, and has observer status in La Francophonie.
It is believed that the Slavic ancestors of the present-day Slovenians settled in the area in the 6th century. The Slavic Duchy of Carantania, the first Slovenian state and the first stable Slavic state, was formed in the 7th century. In 745, Carantania lost its independence, being largely subsumed into the Frankish empire. Many Slavs converted to Christianity.
The Freising manuscripts, the earliest surviving written documents in Slovenian and the first ever Slavic dialect documents in Latin script, were written around 1000. During the 14th century, most of Slovenia's regions passed into ownership of the Habsburgs whose lands later formed the Austro-Hungarian Empire, with Slovenians inhabiting all or most of the provinces of Carniola, Gorizia and Gradisca, and parts of the provinces of Istria and Styria.
In 1848 a strong programme for a united Slovenia emerged as part of the "Spring of Nations" movement within Austria.
With the collapse of the Austro-Hungarian monarchy in 1918, Slovenians joined the Kingdom of Serbs, Croats and Slovenes, later renamed, in 1929, the Kingdom of Yugoslavia. Following the re-establishment of Yugoslavia at the end of World War II, Slovenia became a part of the Socialist Federal Republic of Yugoslavia, officially declared on 29 November 1945. Present-day Slovenia was formed on 25 June 1991 upon its independence from Yugoslavia. Slovenia joined NATO on 29 March 2004 and the European Union on 1 May 2004.