In the 8th and 9th centuries CE, the Ostians slowly abandoned the ancient city. They moved some 800-1000 metres further inland, where they established a little village with no more than 50-100 people. During the 9th century CE, Saracens frequently pirated the Tyrrhenian Coast, which ultimately led Pope Gregory IV to fortify the existing borough, which he renamed Gregoriopolis.
Between 1483 and 1486, a new castle was built by Pope Iulius II – at the time of the construction, he was not pope, but cardinal and was named Giuliano della Rovere. He became pope in 1503. The castle was a renovation and refortification of the Tiber mouth. Unfortunately, or ironically, the Tiber shifted its course towards the sea in 1557, thus leading the castle without any defensive function.
During the excavations of the ancient city, the castle was utilised as part of the exhibition of the vast amount of finds done in the excavations of the Ostia Antica, as well as the office of the first director of the statal excavations, Dante Vaglieri. Today, it is still functioning as a museum, but with selected opening days. The exhibitions consist not of ancient finds from Ostia, but material from the 17th through 19th centuries from the immediate surroundings of the area.
When you visit Ostia today, both the castle and Medieval borough is worth a visit. Inside the borough, with the Renaissance castle located in the southwestern corner of the borough cutting some of the old walls, you can also find a church, the Santa Aurea. Also this was renovated in the same period as the castle was being built. The church has remains dating to the 5th or 6th century CE. Furthermore, it is said that Monica, mother of Saint Augustine, was buried here. This is likely, since the area was part of the ancient necropolis. We know she died in Ostia in 387 CE, thus it is plausible that she was buried in the necropolis there, and later tranferred inside the church.