From 756 to 857, the papacy shifted from the orbit of the Byzantine Empire to that of the kings of the Franks. Pepin the Short (ruled 751–768), Charlemagne (r. 768–814) (co-ruler with his brother Carloman I until 771), and Louis the Pious (r. 814-840) had considerable influence in the selection and administration of popes. The "Donation of Pepin" (756) ratified a new period of papal rule in central Italy, which became known as the Papal States.
This shift was initiated by the Lombards conquering the Exarchate of Ravenna from the Byzantines, strengthened by the Frankish triumph over the Lombards, and ended by the fragmentation of the Frankish Kingdom into West Francia, Middle Francia, and East Francia. Lothair I continued to rule Middle Francia, which included much of the Italian peninsula from 843 to 855.
This period was "a critical time in Rome's transformation from ancient capital to powerful bishopric to new state capital." The period was characterized by "battles between Franks, Lombards and Romans for control of the Italian peninsula and supreme authority within Christendom."
Following the death of Zachary, the last culturally Greek pope, Stephen II (752-757) became the first pope to cross the Alps, in 752, when he appealed in person for the aid of Pepin the Short upon his election, following the Lombard takeover of Ravenna in 751. The Lombards had extinguished the exarchate of Ravenna and turned their attention to the formerly Byzantine Duchy of Rome. Stephen II had asked Constantinople for help, but the Eastern Romans had their own problems, so he traveled all the way to the palatium at Quierzy, where the reluctant Frankish nobles finally gave their consent to a campaign in Lombardy. For his part, then and there, Pepin executed in writing a promise to convey to the Papacy certain territories that were going to be wrested from the Lombards. No actual document has been preserved, but later 8th century sources quote from it. Fulfilling his part, in Paris Stephen anointed him as King of the Franks in a lavish ceremony at the Basilica of St Denis, bestowing upon him the additional title of patricius Romanorum (Patrician of the Romans). The "Donation of Pepin" strengthened the claim of the popes to the de facto core of the Papal States, and thus the incentives for secular interference in papal selection.