 Its original capital was Pavia until the 11th century.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 and some Byzantine possessions in the south.In June 774, the kingdom collapsed and the Franks became masters of northern Italy.