In 773, Charlemagne, the King of the Franks, crossed the Alps to invade the Kingdom of the Lombards, which encompassed all of Italy except the Duchy of Rome, the Venetian Republic and the Byzantine possessions in the south. In June 774, the kingdom collapsed and the Franks became masters of northern Italy. The southern areas remained under Lombard control as the Duchy of Benevento was changed into the rather independent Principality of Benevento. Charlemagne adopted the title "King of the Lombards" and in 800 was crowned "Emperor of the Romans" in Rome. Members of the Carolingian dynasty continued to rule Italy until the deposition of Charles the Fat in 887, after which they once briefly regained the throne in 894–896. Until 961, the rule of Italy was continually contested by several aristocratic families from both within and outside the kingdom.