Guerra del pacific
The war began on February 14, 1879 when Chilean armed forces invaded Bolivia and occupied the port city of Antofagasta in response to a Bolivian threat to confiscate Chilean Antofagasta Nitrate Company's property. Peru attempted to mediate, but when Bolivia announced that a state of war existed, the situation deteriorated. Bolivia called on Peru to activate their mutual defense pact, whereas Chile demanded that Peru immediately declare its neutrality. On April 5, after Peru resisted both demands, Chile declared war on both nations. The following day, Peru responded by acknowledging the casus foederis.
This "Saltpeter War" took place over five years in a variety of terrain, including the Atacama Desert and Peru's deserts and mountainous regions. The war's first battle was the Battle of Topáter. For most of the first year the focus was on the naval campaign, as Chile struggled to establish a sea-based resupply corridor for its forces in the world's driest desert. The Peruvian Navy met initial success, but the Chilean Navy prevailed. Afterwards, Chile's land campaign bested the badly equipped Bolivian and Peruvian armies, leading to Bolivia's complete defeat and withdrawal