More successful was the Peruvian victory in 1866 over Spain's attempts to seize control of the guano-rich Chincha Islands in a tragicomic venture to recapture some of its lost empire in South America.
...a military figure, Mariano Ignacio Prado (1865-67, 1876-79), who had rallied the country against the Spanish naval attack in 1865 and then served as president...
Even during internal and external conflicts, Chile continued to prosper. When Spain attempted to reconquer Peru, Chile engaged in a coastal war (1864-66) with the Spaniards, whose warships shelled Valparaíso. Once again, Chile asserted its sway over the west coast of South America. Farming, mining, and commerce grew steadily until the world depression of the 1870s, when Chile again turned to a war against its Andean neighbors.