[1][2] Tivoli was strongly fortified by Belisarius in the Gothic War, but almost destroyed by Totila in 540.
After the Lombard invasion it was in the power of the Byzantines and formed part of the patrimony of St. Peter.
In the 13th century the Senate of Rome succeeded (under Pope Innocent IV) in imposing a tribute on the city, and arrogated to itself the right of appointing a count to govern it in conjunction with the local consuls.
But its strength was undermined by internal factions, in consequence of which Pope Pius II constructed the fortress which still exists.
In 1527 it was sacked by bands of the supporters of the emperor and the Colonna, important archives being destroyed during the attack.