After definitely wiping out the feudal system in Versilia, Lucca began to fortify new areas and put the castles of the Versilian cattani back into shape. In this context Lucca began, in 1223, the construction of the new castle of Rotaio to stop the advance of Pisans. A watch tower was built at the foot of the mountain.
Between 1315 and 1324 the castle was held by Pisa and further fortified, until Castruccio Castracani, ruler of Lucca, took it back. After the death of Castruccio, however, the Pisans continued to assert their claims on the castle and obtained it again in 1342. Rotaio, together with Pietrasanta and its vicariate, returned under Lucca in 1369 when Emperor Charles IV freed them from Pisan sovereignty.