Although it has been speculated that its construction could date to Lombard times, what is known with certainty is only that it predates the town's reconstruction in 1237. In 1242 it was rebuilt by Frederick II and was later frequently renovated: in 1350, during the Perugine domination, a central keep (Cassero) was added, while a few years later other intervention were carried on by Biordo Michelotti.