 In antiquity Trevi is said to have had jurisdiction over much of the valley below, all the way to the Monti Martani that form the central backbone of Umbria.The seat of a bishop until the 11th century, Trevi was a Lombard gastaldate, then, in the early 13th century, freed itself of outside rulership to become a free commune.It generally allied itself with Perugia in order to defend itself from nearby Spoleto, and fought several wars with other neighboring communes, with varying outcomes, including invasion by Spoleto in the 14th century and a brief but unhappy rule of the Trinci warlords of Foligno.