lucca occupied and destroyed pescia during the 13th century, but the town was quickly rebuilt. during the entire middle ages florence and lucca contended for the city, as the latter was located on the border between the two republics. in 1339, after almost ten years of war, florence occupied it.