The first part of the castle dates from the eighth - ninth century and was built on a rocky outcrop between two lakes, right opposite the Roman city. The Lombard fief of the Counts of Aquino was one of the most important in southern Italy. Their fortress-castle, where the emperor Frederick II lived for a few days in the thirteenth century, was related to the same family of St. Thomas, and was still flourishing until the fifteenth century, when Aquino became part of the possessions of the Boncompagni dukes. The tradition says that in this castle St. Thomas was born, in the building that today is called "the house of St. Thomas." The medieval town and the palace suffered bombings during World War II and have been recently restored.