However, Lima was not free from dangers. On October 20 and December 2, 1687, powerful earthquakes destroyed most of the city and its surroundings. The outbreaks of disease and food shortages which followed the disaster caused a reduction of the population to under 40,000 by 1692. A second threat was the presence of pirates and privateers in the Pacific Ocean. A Dutch naval expedition led by Jacques l'Hermite attacked the port of Callao in 1624 but was repelled by Viceroy Diego Fernández de Córdoba. In the 1680s, English buccaneers proliferated in the waters of the Pacific until they were routed by Lima merchants in 1690. As a precautionary measure, Viceroy Melchor de Navarra y Rocafull built the Lima City Walls between 1684 and 1687.