Rome finally abandoned the region at the end of the 4th century.
Most cities were destroyed, while the remaining local population moved to the highland areas, establishing fortified towns.
This marks the beginning of Paleolithic research in Slovenia.
The earliest signs of human settlement in present-day Slovenia were found in Hell Cave in the Loza Woods near Orehek in Inner Carniola, where two stone tools approximately 250,000 years old were recovered.
In the 5th century, the region was part of the Ostrogothic kingdom, and was later contested between the Ostrogoths, the Byzantine Empire and the Lombards.
The Slavic ancestors of present-day Slovenes settled in the East Alpine area at the end of the 6th century.
Coming from two directions, North (via today's East Austria and Czech Republic), settling in the area of today's Carinthia and west Styria and South (via today's Slavonia), settling in the area of today's central Slovenia.
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 Spannheim, the Counts of Gorizia, the Counts of Celje and finally the House of Habsburg.During the 14th century, most of the Slovene Lands passed under the Habsburg rule.In the 15th century, the Habsburg domination was challenged by the Counts of Celje, but by the end of the century the great majority of Slovene-inhabited territories were incorporated into the Habsburg Monarchy.The eastern part of Carantania was ruled again by Avars between 745 and 795.Carantania retained its internal independence until 828 when the local princes, following the anti-Frankish rebellion of Ljudevit Posavski, were deposed and gradually replaced by a Germanic (primarily Bavarian) ascendancy.In the transition period between the Bronze age to the Iron age, the Urnfield culture flourished.