The present shape of the walls was defined in the 14th century after the city gained its full independence from Venetian suzerainty, but the peak of its construction lasted from the beginning of the 15th century until the latter half of the 16th century. Being constructed very solidly, the walls were generally unaffected by a strong earthquake occurring in 1667.