In 1383, control of Foiano passed from Arezzo to Florence and the inhabitants built fortified walls around the town. In 1387 the city became a free commune and the first communal statute was drafted. After the siege of the Aragonese, Foiano fell back into Florentine control and the new "heart shaped" town walls were built in 1480.