Charlemagne, rex Francorum, had succeeded to the throne in 768 jointly with his brother Carloman. At the time there was antagonism between not only the two ruling brothers, but between the king of the Lombards, Desiderius, and the papacy. In 772, Pope Hadrian I expelled all the Lombard officials from the papal curia. In response, Desiderius invaded papal territory, even taking Otriculum, just a day's march from Rome. Hadrian called Charlemagne for assistance. Charles had produced an alliance with the Lombards by marrying one of Desiderius' daughters, Desiderata; within a year, however, he had changed his mind about the marriage and alliance, and divorced his wife, sending her back to her father. This was taken as an insult by the Lombards. Upon the death of Carloman in 771, his own wife, Gerberge, fled the kingdom with her children for reasons now unclear and sought refuge with Desiderius at Pavia. Desiderius now returned the insult to the Franks by giving her asylum, and protesting that her children be allowed their share of the Kingdom of the Franks. The relationship between Frank and Lombard now broke down completely and the pope took full advantage. His embassy landed at Marseilles and travelled to Thionville, where they delivered this message: Charlemagne ascertained the truth of Desiderius' aggressions and the threat he posed to his own Frankish realm and marched his troops towards Italy in the early summer of 773.
Siege
Charles' army had 10,000–40,000 troops; he divided it in half, giving command of one half to his uncle, Bernard, son of Charles Martel, and led it through the Alpine passes; he through that of the Dora Susa near Mont Cenis, and Bernard through the Great St Bernard Pass. At the foot of the mountains, Charles' army met the fortifications of Desiderius, but scouting forces found an alternate route. A cavalcade was sent to attack the defenders from the flank and, with Bernard's forces approaching from the east, the Lombards fled to fortified Pavia. The Frankish troops then marched on to begin the siege of Pavia by September. The entire Frankish army was capable of wholly surrounding the Lombard capital, however they had brought no siege engines. The Lombards too had failed in their preparations: the city was poorly stocked with food and the surrounding countryside was now in the hands of the Franks. Desiderius remained in Pavia, but Adelchis, his son, had left to stronger Verona to guard over the family of Carloman. Charles led a small force to besiege Verona. Adelchis fled in fear to Constantinople, and the city and Carloman's family were taken. Charles then began to subdue the whole region around Pavia in the early months of 774. Charles even visited the pope in Rome at Easter. No other Lombard dukes or counts made any attempt at relief and Desiderius made no strong counterattack. In the tenth month of the siege, famine was hitting Pavia hard and Desiderius, realising that he was left on his own, opened the gates to Charles and surrendered on some Tuesday in June. The Lombards who managed to leave Pavia crossed the Apennines and settled in present-day Liguria where the Republic of Genoa was born later.
Legacy
After the victory, Charlemagne had himself declared rex Langobardorum, and from that time onwards he was to be called King of the Franksand Lombards. This was unique in the history of the Germanic kingdoms of the Dark Ages: a ruler taking the title of the conquered. Charles was forging what could truly be called an "empire". He was also allying himself very closely with the church as its protector. His recognition of temporal papal authority in central Italy laid the foundation for mediaeval Papal power. The decline of the Lombard state had been swift and the changes wrought in Italy by the Frankish conquest were great. Many Franks entered into positions of power and authority in Italy, though many Lombards, on account of their willingness to make peace with Charles, retained their positions. As Paul K. Davis writes, "The defeat and consequent destruction of the Lombard monarchy rid Rome of its most persistent threat to papal security, laying the groundwork for the Holy Roman Empire."