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, being the most important, was elevated into the Duchy of Carinthia in 976.