See L. Valla, Treatise on the Donation of Constantine (tr. by C. B. Coleman, 1922; repr. 1971).
In 728, Liutprand, king of the Lombards, reached an agreement at Sutri with Pope Gregory II giving to the Papacy the fortified hilltown of Sutri on the Via Cassia and some other fortified sites in Latium. This "Donation of Sutri" marked the historic foundation of the Papal States.
In 751 the Lombards under their king Aistulf had conquered the Exarchate of Ravenna, the main seat of Byzantine government in Italy, whose Patriarch held territorial power as the representative of the Eastern Roman emperor, independent of the Pope. The Lombard Duke of Spoleto and the Lombard kings posed a threat to Roman territory, and Aistulf demanded tribute from the able diplomat, Pope Zachary, who had successfully temporized with his predecessors. Zachary died in March 752, and after the death of Pope-elect Stephen three days after his election in March 752, the eventual successor, Pope Stephen II, went to meet Pepin at Quiercy-sur-Loire in 753, the first time a pope had crossed into Gaul, taking with him the recent forgery, the "Donation of Constantine," which purported to justify the bishop of Rome's territorial powers. There he presented a copy to the new king of the Franks, Pepin the Short, who had been crowned at Soissons with Zachary's blessing. At Quiercy the Frankish nobles finally gave their consent to a campaign in Lombardy. Roman Catholic tradition asserts that then and there Pepin executed in writing a promise to give to the Church certain territories that were not yet in fact Pepin's to give. No actual document has been preserved, but later 8th century sources quote from it.
In return, in 756, Pepin and his Frankish army forced the last Lombard king to surrender his conquests, and Pepin officially conferred upon the pope the territories belonging to Ravenna, even cities such as Forlì with their hinterlands, laying the Donation of Pepin upon the tomb of Saint Peter, according to traditional later accounts. The gift included Lombard conquests in the Romagna and in the duchies of Spoleto and Benevento, and the Pentapolis in the Marche (the "five cities" of Rimini, Pesaro, Fano, Senigallia and Ancona). For the first time, the Donation made the pope a temporal ruler over a strip of territory that extended diagonally across Italy from the Tyrrhenian to the Adriatic. Over these extensive and mountainous territories the medieval popes were unable to exercise effective sovereignty, given the pressures of the times, and the new Papal States preserved the old Lombard heritage of many small counties and marquisates, each centered upon a fortified rocca.
Pepin confirmed his Donation in Rome in 756, and in 774 Charlemagne confirmed the donation of his father.