The Romans established posts at Emona (Ljubljana), Poetovio (Ptuj), and Celeia (Celje); and constructed trade and military roads that ran across Slovene territory from Italy to Pannonia.In the 5th and 6th centuries, the area was subject to invasions by the Huns and Germanic tribes during their incursions into Italy.In a parallel process, an intensive German colonisation significantly diminished the extent of Slovene-speaking areas.By the 15th century, the Slovene ethnic territory was reduced to its present size.Consequently, the Frankish feudal system reached the Slovene territory.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.By the late Middle Ages, the historic provinces of Carniola, Styria, Carinthia, Gorizia, Trieste, and Istria developed from the border regions and were incorporated into the medieval German state.
The area that is present-day Slovenia was in Roman times shared between Venetia et Histria (region X of Roman Italia in the classification of Augustus) and the provinces Pannonia and Noricum.
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.
They were mostly christianized by Irish missionaries, among them Modestus, known as the "Apostle of Carantanians".
This process, together with Christianization of Bavarians, was later described in the memorandum known as the Conversio Bagoariorum et Carantanorum, which is thought to have over-emphasized the role of the Church of Salzburg in the Christianization process over similar efforts of the Patriarchate of Aquileia.