 In 738 the Lombard duke Transamund II of Spoleto captured the Castle of Gallese, which protected the road to Perugia to the north of Nepi.Pope Gregory III made a large payment to the duke to restore the castle to him.The pope then sought an alliance with Duke Transamund to protect himself against Liutprand.