<P> The Duchy of Rome was a Byzantine district in the Exarchate of Ravenna, ruled by an imperial functionary with the title dux . Within the exarchate, the two chief districts were the country about Ravenna where the exarch was the centre of Byzantine opposition to the Lombards, and the Duchy of Rome, which embraced the lands of Latium north of the Tiber and of Campania to the south as far as the Garigliano . There the pope himself was the soul of the opposition . </P> <P> The pains were taken, as long as possible, to retain control of the intervening districts and with them communication over the Apennine mountains . In 728, the Lombard King Liutprand took the Castle of Sutri, on the road to Perugia, but restored it to Pope Gregory II "as a gift to the blessed Apostles Peter and Paul". The popes continued to acknowledge the imperial Government . </P> <P> In 738, the Lombard duke Transamund of Spoleto captured the Castle of Gallese, which protected the road to Perugia . By a large payment, Pope Gregory III induced the duke to restore the castle to him . </P> <P> In 751, Aistulf took Ravenna and threatened Rome . In response to this threat, Pope Stephen II made an unusual journey north of the Alps to visit the Frankish king, Pepin III, to seek his help against the invading Lombards . </P>

Where did the idea of the pope come from