During the Last Glacial Period, present-day Slovenia was inhabited by Neanderthals; the best-known Neanderthal
archaeological site in Slovenia is a cave close to the village of Šebrelje near Cerkno, where the Divje Babe Flute, the oldest known
musical instrument in the world, was found.
Remains of pile dwellings over 4.500 years old were discovered in the Ljubljana Marsh, now protected as a UNESCO World Heritage
Site, along with the Ljubljana Marshes Wooden Wheel, the oldest wooden wheel in the world. It shows that wooden wheels appeared
almost simultaneously in Mesopotamia and Europe.
In the transition period between the Bronze Age to the Iron Age, the Urnfield culture (1300–750 BC) flourished. Archaeological
remains dating from the Hallstatt period (1200–450 BC) have been found, particularly in southeastern Slovenia, among them a number of
situlas in Novo Mesto, the "Town of Situlas".
In the Iron Age, present-day Slovenia was inhabited by Illyrian and Celtic tribes until the 1st century BC, when the Romans
conquered the region establishing the provinces of Pannonia and Noricum. What is now western Slovenia was included directly
under Roman Italia as part of the X region Venetia et Histria. Rome finally abandoned the region at the end of the 4th century AD.
In the 5th and 6th centuries, the area was subject to invasions by the Huns and Germanic tribes during their incursions into Italy.
The Slavic tribes migrated to the Alpine area after the westward departure of the Lombards (the last Germanic tribe) in 568, and
under pressure from Avars established a Slavic settlement in the Eastern Alps.
From 623 onwards, King Samo united the Alpine and Western Slavs against the Avars and Germanic peoples and established what is referred
to as Samo's Kingdom. After Samo's death (658), the Slavs of Carniola again fell to Avar rule, while the Slavs north of the
Karavanke range established the independent Principality of Carantania.
In 745, Carantania, being pressured by newly consolidated Avar power, submitted to Bavarian overrule and were, together with the Duchy of
Bavaria, incorporated into the Carolingian Empire. After the victory of Emperor Otto I over the Magyars in 955, Slovene
territory was divided into a number of border regions of the Holy Roman Empire. Carantania was elevated into the Duchy of
Carinthia in 976.
In the late 10th and beginning of the 11th century, primarily because of the Hungarian threat, the south-eastern border region of the Holy
Roman Empire was organized into so called "marks", that became the core of the development of the historical Slovenian lands,
the Carniola, the Styria and the western Goriška/Gorizia. The consolidation and formation of the historical Slovenian
lands took place in a long period between 11th and 14th century being led by a number of important feudal families such as the Dukes of
Spanheim, the Counts of Gorizia, the Counts of Celje and finally the House of Habsburg.
Between the 15th and the 17th centuries, many areas, especially in southern Slovenia, were devastated by the Ottoman–Habsburg Wars.
The nobility of the Slovene-inhabited provinces had an important role in the fight against the Ottoman Empire. The Carniolan noblemen's army
thus defeated the Ottomans in the Battle of Sisak of 1593, marking the end of the immediate Ottoman threat to the Slovene Lands,
although sporadic Ottoman incursions continued well into the 17th century.
In the 16th and 17th centuries, the western Slovene regions became the battlefield of the wars between the Habsburg monarchy and the
Venetian Republic, most notably the War of Gradisca, which was largely fought in the Slovene Goriška region. After the
dissolution of the Republic of Venice in 1797, the Venetian Slovenia was passed to the Austrian Empire.
Between 1805 and 1813, the Slovene-settled territory was part of the Illyrian Provinces, an autonomous province of the Napoleonic
French Empire, the capital of which was established at Ljubljana. Although the French rule in the Illyrian Provinces was short-lived
it significantly contributed to greater national self-confidence and awareness of freedoms. They introduced equality before the law, compulsory
military service for men and a uniform tax system, and also abolished certain tax privileges, introduced modern administration,
separated powers between the state and the Church, and nationalised the judiciary.
In August 1813, Austria declared war on France. Austrian troops led by General Franz Tomassich invaded the Illyrian Provinces and all
Slovene Lands were, once again, included in the Austrian Empire.
World War I brought heavy casualties to Slovenes, particularly the twelve Battles of the Isonzo, which took place in present-day
Slovenia's western border area with Italy. Following the dissolution of Austro-Hungarian Empire in the aftermath of the World War I, a
National Council of Slovenes, Croats and Serbs took power in Zagreb on 6 October 1918. On 29 October independence was declared by a
national gathering in Ljubljana, and by the Croatian parliament, declaring the establishment of the new State of Slovenes, Croats and
Serbs. On 1 December 1918 the State of Slovenes, Croats and Serbs merged with Serbia, becoming part of the new Kingdom of Serbs, Croats
and Slovenes, itself being renamed in 1929 to Kingdom of Yugoslavia.
Slovenia was the only present-day European nation that was trisected and completely annexed into both Nazi Germany and Fascist Italy
during World War II. In addition, the Prekmurje region in the east was annexed to Hungary, and some villages in the Lower Sava Valley
were incorporated in the newly created Nazi puppet Independent State of Croatia. In south-central Slovenia, annexed by Fascist Italy
and renamed the Province of Ljubljana, the Slovenian National Liberation Front was organized in April 1941. Led by the
Communist Party, it formed the Slovene Partisan units as part of the Yugoslav Partisans led by the Communist leader Josip Broz Tito.
In 1945, Yugoslavia was liberated by the partisan resistance and soon became a socialist federation known as the People's Federal Republic
of Yugoslavia. The first Slovenian republic, named Federal Slovenia, was a constituent republic of the Yugoslavian federation, led
by its own pro-Communist leadership.
In September 1989, numerous constitutional amendments were passed to introduce parliamentary democracy to Slovenia. On 7 March 1990, the
Slovenian Assembly changed the official name of the state to the Republic of Slovenia. In April 1990, the first democratic election
in Slovenia took place, and the united opposition movement DEMOS led by Jože Pučnik emerged victorious.
In December 1991, a new constitution was adopted, followed in 1992 by the laws on denationalisation and privatization. The members of the
European Union recognised Slovenia as an independent state on 15 January 1992, and the United Nations accepted it as a member
on 22 May 1992. Slovenia joined the European Union on 1 May 2004. Slovenia subsequently succeeded in meeting the Maastricht criteria and
joined the Eurozone on 1 January 2007