Throughout the 19th century, border disputes (often related to resource rich areas) remained a primary reason for conflict between South American nations. The War of the Pacific (La Guerra Del Pacifico) isn't an exception to this, but the months leading up to the war requires an in-depth look to understand how this came to be. But first, let's start by looking at the region in question: The Antofagasta region of Bolivia, located in the Atacama desert.
The Atacama desert is the driest desert in the world. In 1879, three nations had the desert within its borders: Peru, Bolivia and Chile. Where the border between northern Chile and southern Bolivia at this stage was remained disputed for the greater part of the latter half of the 19th century. Bolivia made claims south to the 25th south latitude. Chile made claims north to the 23rd south latitude. But why would Bolivia, Peru and Chile go to war over a piece of really dry and lifeless desert?
In the 1860s, significant deposits of guano and saltpeter were discovered in the Atacama desert. Both guano and saltpeter are important ingredients in commercial fertilizer and explosives, which made them a very valuable export for Peru and Bolivia. This escalated the dispute between Bolivia and Chile to the brink of war, but due to the Chincha Islands War (which made allies out of rivals when faced with a greater, older enemy: Spain), the tensions were resolved by an agreement in 1866. Chile agreed to draw her border to the 24th south latitude in exchange for both nations gaining the rights to equally share the revenue of the extraction of resources between the 23rd and 25th south latitude. This could have prevented the war had not a worldwide economic recession hit the world.
1873 marked the beginning of a worldwide economic depression which reached all the way to Chile. Faced with a decrease in its important copper, silver and wheat exports, Chile looked for a new export to pull the nation out of its current recession. As a result of the recession, many Chileans set out to migrate to the Antofagasta and Tarapacá regions in the desert to find work with the companies that had permission to extract saltpeter, companies that sometimes preferred Chilean workers over Peruvians and Bolivians. This influx of foreign workers into Bolivian and Peruvian territory created more tensions. Chileans who had moved to the Bolivian region considered themselves mistreated by the local government. These local tensions reflected national tensions. Throughout this period, the governments of Bolivia and Chile made new treaties about their mutual border. With a new government in Bolivia after the fall of General Mariano Melgarejo and the previous 1866 agreement repudiated, Chile now tried to protect and guarantee the interests and investments of its citizens while at the same time looking at the possibilities of extending its own national borders. Yet again did the tensions escalate to the brink of war. Chile was not only faced with a possible war against Bolivia but also against Argentina with which it had another dispute with. Instead of escalating matters with Bolivia, the Chilean government agreed to a settlement 1874 where Chile got to keep its current northern border but had to agree to relinquish all previous claims. In exchange, the Bolivian government agreed to not increase taxes levied on exports by Chilean companies operating in the disputed region. War was averted once more.
This would last until 1878. In February 1878, the Bolivian government under President Hilarión Daza imposed a 10 cent export tax on the Chilean Compañia de Salitres y Ferrocarril. This immediately prompted a diplomatic crisis which until December 1878 seemed like it would be resolved. In December 1878, the hopes for a diplomatic solution suddenly vanished when the Bolivian government demanded the company to pay the taxes or see its property be confiscated and sold at public auction. The company refused and its property was confiscated in January 1879. The Chilean government protested, citing the 1874 treaty. Bolivia refused to cooperate, not expecting Chile to do anything to escalate the conflict since Chile had peacefully solved its territorial dispute with Argentina in December 1878. The public auction was scheduled for February 14 1879 and it was at that day that Chilean troops landed and occupied Antofagasta. This act was justified by the Chilean government by claiming that the 1874 treaty was no longer valid after Bolivia's imposition of taxes and that Chile could now reoccupy territory that it had given up the claims for in 1874. Two weeks after the occupation, the Bolivian government declared war on Chile.
But what about Peru? What's their role in all of this? How did they get involved in the war?
Throughout the tensions in the 1870s, the threat of Peru remained a constant factor of possible conflict for the Chilean government. Peruvian maritime interests on the Pacific were of paramount importance. Chile was the biggest threat on the pacific coast and with the two nation committing themselves to a naval rearmament, tensions increased between them. Following the line of the enemy of my enemy is my friend, Bolivia and Peru entered into a secret military treaty in 1873. Chile found out about this secret treaty soon thereafter but didn't consider it a threat, thinking that Peru wouldn't honor the treaty. After the declaration of war by Bolivia, the focus turned to Peru as the nation began to prepare to war. Throughout the month of march 1879, Chile tried to come to a diplomatic solution with Peru. If Chile returned the occupied Bolivia territory, the Peruvian mediator said, then Peru would stay out of the conflict. This the Chilean government couldn't do, since this did not mean that the Bolivian government would rescind the imposed tax. Furthermore, with the Chilean President Anibal Pintos unpopularity (political and economic issues plagued the country), a Chilean withdrawal would have meant the overthrow on his government. When nothing came out of the diplomatic talks with Peru, the three nations were set on a collision course. On April 4 1879, Chile severed diplomatic relations and the following day, Chile officially declared war.