It was surrounded by a line of walls starting from 1371, carried on by the Republic of Siena to which it belonged until 1559, when it became part of the Grand Duchy of Tuscany. It was annexed to Italy in 1861.