No era was more traumatic for Peru than the War of the Pacific and its aftermath, in which Peru and Bolivia squared off against their southern neighbor, Chile. It had an impact on the solidity of central government and the shape of local societies well into the 20th century. It also scarred the national elite with an inferiority complex that distorted policy.
The war was fought over the nitrate deposits located in the coastal deserts and the power of the governments of Peru and Bolivia to levy taxes on the commercial operators, which happened to be Chilean and British. The conflict was fueled by deep geographical and commercial rival ires. It caught Peru when it was practically penniless and cut off from international credit. The dispute was originally with Bolivia but Peru was brought into the war because it had an alliance with Bolivia and Argentina to contain Chilean expansion. Argentina never fulfilled its oblications.
President Mariano Ignacio Prado fled the country in December 1879 with the excuse that he was going to get loans for arms in Europe.
With sea superiority after the defeat of Peru's small fleet, Chile began hopscotching up the coast taking one port after another. Lima fell to the invading army in January 1881 after the defeats of the battles of San Juan and Miraflores. The southern suburbs of Lima were sacked and burned to the ground. The outlying haciendas were burned donw by the Chinese coolies who had been brought in for cheap labor.
Chile engaged in a savage campaign throughout Peru, especially on the coast and the central Sierra. Capital stock was taken back to Chile as spoils of war. Chile also confiscated the National Library.
The war continued until October 1883, in part because the Peruvian elite was so internally divided that they could not settle on peace terms. Several factions claimed to be the legitimate government. Chilean troops finally left in 1884.
In the settlement, Peru lost Tarapaca and Arica departments, truncating the national territory by 600 miles. These areas turned out to the core of Chile's mineral riches. Moquequa and Tacna departments were ceded to Chile for 10 years, but Peru did not regain these lands until 1931.
For the rest of the century, Peru would be ravaged by civil war and warring factions. The weakening -- or central government meant that local powers had to get
Both Bolivia and Peru bear the signs of the war. Bolivia still makes frequent demands for access to the Pacific ports. Peru's massive purchase of military hardware in the 2nd half of the 20th century were fueled by resentment against Chile.