The Rocca di Scarlino was probably built around the 10th century, but it wasn't officially mentioned until 1108. In recent years, archaeologists have found traces of a Hellenistic wall (4th-2nd BC) inside the fortress, so it might be even older.
In the 12th century, the Aldobrandeschi acquired all of Scarlino after Ildebrandino Aldobrandeschi married the daughter of the territory's former ruler, Count Alberto Alberti.
The castle we see today is the one the Aldobrandeschi designed. It's linked to the city walls via the Porta Senese door. If you look up high enough, you can see deep battlements carved into the surrounding rock. They helped make the castle impregnable.
Three towers were built to protect the sides that faced the cliff. The south-east tower was used as a lookout over the sea, the south-west tower was used by archers when enemies attacked and the north-west tower was the last defensive bastion protecting the castle's courtyard.
Internally, the only structure that remains intact is the cistern, which is located in the north-eastern side. The castle often hosts concerts and theatre performances and you can go on guided tours. Check at the tourist office.
Photo: Paolo Ramponi via Wikipedia Commons.