Castellammare di Stabia lies next to the ancient Roman city of Stabiae, which was destroyed by the eruption of Mount Vesuvius in AD 79. The castle, of the city it takes its name from, was erected around the 9th century on a hill commanding the southern side of the Gulf of Naples. It was restored during the reign of Frederick II of Hohenstaufen and enlarged by King Charles I of Anjou.