In 745, Carantania and the rest of Slavic-populated territories of present-day Slovenia, being pressured by newly consolidated Avar power, submitted to Bavarian overrule and were, together with the Duchy of Bavaria, incorporated into the Carolingian Empire, while Carantanians and other Slavs living in present Slovenia converted to Christianity.
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.