History
Karantania
The Slavic Duchy of Karantania mainly occupied the territory of today's Austrian Carinthia and Slovenian Carinthia. It emerged from the ashes of the first Slavic union: Samo's Tribal Union.
Samo connected the Western and the Southern Slavic tribes. The union spanned from the Baltic Sea to the Adriatic Sea. Its purpose was to defend the Slavs from the Bavarians, the Langobards and the Avars. It collapsed due to the death of Samo (658) and the disconnected link between the Western and the Southern Slavs.

After the demise of Samo's Tribal Union, Karantanians established their duchy under the guidance of knez (lord) Valuk. In 745 Karantania joined the Frankish kingdom as an independent country with its own law (consuetudo Sclavorum) and perserved the inauguration of its knez (lord) in Slovenian language until the year 1414 on the stone of the knez (knežji kamen). To the year 1651 the oath ceremony of the lord took place at the Duke's Chair (Vojvodski stol) and then until the year 1728 in the county house in Klagenfurt (Celovec). The inauguration ritual is described in Jean Bodin's book Six livres de la République and it is known that Thomas Jefferson learnt about it from that book.
Middle Ages
From as early as the 9th century, the lands inhabited by Karantanians, later Slovenes, fell under non-Karantanian ruler, including partial but co-operative control by Bavarian dukes and by the Republic of Venice.
The Slovenes living in the provinces of Carinthia, Carniola and Styria, lived under the rule of the Habsburg dynasty from the 14th century until 1918, with the exception of Napoleon's 4-year tutelage of parts of modern-day Slovenia and Croatia — the "Illyrian provinces".
While the elites of these regions mostly became Germanized, the peasants strongly resisted Germanizing influences and retained their unique Slavic language and culture.
A major step towards the social and cultural emancipation of the Slovenians happened during the Reformation, when Primož Trubar published the first printed books in the Slovenian language (Catechismus and Abecedarium, 1550 in Tübingen, Germany). Protestant publishing in Slovene culminated by a full translation of the Bible (Jurij Dalmatin, Wittenberg 1584). Even though the majority of the population assumed Protestant teaching, the region became re-Catholicized under the rule of Archduke Ferdinand of Inner Austria (ruled 1590 - 1637), who later became Emperor and pursued similar policies in the other Habsburg territories.
Ancient times
Celts and Illyrians inhabited the territory of Slovenia in ancient times. The Roman Empire established its rule in the region in the 1st century, after 200 years of fighting with the local tribes. The most important ancient Roman cities in this area included: Celeia (now Celje), Emona (Ljubljana), Nauportus (Vrhnika), Poetovio (Ptuj). The modern country's territory was split among the Roman provinces of Dalmatia, Italia, Noricum, and Pannonia.
Yugoslavia
In 1918, after World War I, the Slovenes joined with other southern Slav peoples in forming the State of Slovenes, Croats and Serbs (October 29, 1918) and then the Kingdom of Serbs, Croats and Slovenes (December 1, 1918) under King Peter I of Serbia. Renamed in 1929, the Kingdom of Yugoslavia fell to the Axis powers during World War II, when Germany, Italy and Hungary each annexed parts of Slovenia, the largest part being the Südsteiermark annexed to the "Ostmark" (Nazi German Austria).
Following Yugoslav partisan resistance to German, Hungarian, and Italian occupation and elimination of rival resistance groups that were forced into open collaboration with Italian and/or German forces while fighting communism, Josip Broz Tito established the Socialist Federal Republic of Yugoslavia in 1945, of which Slovenia formed a constituent republic.
Slovenia continued to form Yugoslavia's most prosperous and advanced republic throughout the communist era, at the forefront of Yugoslavia's unique version of communism.
Independet Slovenia
On December 23, 1990, 88% of Slovenia's population voted for independence in a plebiscite, and on June 25, 1991, the Republic of Slovenia declared its independence.
A 10-day war with Yugoslav People's Army (JNA) followed (June 27, 1991 - July 6, 1991). The Yugoslav forces withdrew after Slovenia demonstrated stiff resistance to Belgrade.
Historical ties to Western Europe made Slovenia a strong candidate for accession to the European Union. This occurred on May 1, 2004. The other Yugoslav Republics all had to remain outside the European Union. Just a few weeks earlier - in March 2004 - Slovenia had become a member of NATO.
