The fortress incorporated the oldest circular tower, built in 1423-24 by Pope Martin V Colonna, which became the Castle of Julius II of Rome.
In the fortress was the seat of the papal customs office, which regulated the payment of taxes on goods arriving in Rome by sea. Upon ascending the papal throne, Julius II (1503-1513) ordered significant transformations: a true papal apartment was built on the western side of the courtyard, renovating some rooms from the Borgia period. The three floors of the building were connected by a monumental staircase, frescoed, according to recent studies, by Baldassare Peruzzi with some collaborators including the Lombard Cesare da Sesto.
At the end of the conflict between France and Spain, the fortress of Ostia suffered a famous siege by the Spaniards in 1556, which caused considerable damage to the structure. The following year, in 1557, following a spectacular flood, the Tiber changed its course by moving away to follow a new path, still preserved today. This caused the transfer of the papal customs office first to Tor Boacciana and then to Tor S.Michele.
In the 18th century, the castle was used as a barn and then in the following century became a prison for convicts used as labor in the excavations of ancient Ostia. After various restorations carried out during the 20th century, a new museum layout was created in 2003 in some rooms of the papal apartments and the keep, displaying the most significant part of the collection of late medieval and Renaissance ceramics, coming from excavations carried out last century inside the castle and the village.

