Contended for centuries by the Republics of Pisa and Lucca, it was later conquered by Florence in the 15th century. In 1555 Grand Duke Cosimo I de' Medici had hydraulic works built here to regulate the floods of the Arno, a move which boosted agriculture in the area.