 By 1777, the city included 13,700 inhabitants with a garrison of 1300.The population reached 17,600 in 1809.The reconstruction after the Raid on Cartagena (1697) was initially slow, but with the end of the War of the Spanish Succession around 1711 and the competent administration of Juan Díaz de Torrezar Pimienta, the walls were rebuilt, the forts reorganized and restored, and the public services and buildings reopened.