A part of the inner state was protected with a defensive line of towers and walls called Claustra Alpium Iuliarum.A crucial battle between Theodosius I and Eugenius took place in the Vipava Valley in 394.This large dynasty, important at a European political level, had its seat in Slovene territory but died out in 1456.Its numerous large estates subsequently became the property of the Habsburgs, who retained control of the area right up until the beginning of the 20th century.During the same period Carniola, too, came under the Franks, and was Christianised from Aquileia.Following the anti-Frankish rebellion of Liudewit at the beginning of the 9th century, the Franks removed the Carantanian princes, replacing them with their own border dukes.
During World War II, Slovenia was occupied and annexed by Germany, Italy, and Hungary, with a tiny area transferred to the Independent State of Croatia, a Nazi puppet state.
In 2002, remains of pile dwellings over 4,500 years old were discovered in the Ljubljana Marshes, now protected as a UNESCO World Heritage Site, along with the Ljubljana Marshes Wooden Wheel, the oldest wooden wheel in the world.
In the transition period between the Bronze age to the Iron age, the Urnfield culture flourished.
Afterward, it was a founding member of the Federal People's Republic of Yugoslavia, later renamed the Socialist Federal Republic of Yugoslavia, a communist state which was the only country in the Eastern Bloc which was never part of the Warsaw Pact.
In June 1991, after the introduction of multi-party representative democracy, Slovenia split from Yugoslavia and became an independent country.