Chile declares war on Bolivia and Peru, starting the War of the Pacific.

The War of the Pacific (Spanish: Guerra del Pacfico), also known as the Saltpeter War (Spanish: Guerra del salitre) and by multiple other names, was a war between Chile and a BolivianPeruvian alliance from 1879 to 1884. Fought over Chilean claims on coastal Bolivian territory in the Atacama Desert, the war ended with a Chilean victory, which gained for the country a significant amount of resource-rich territory from Peru and Bolivia.

The war began over a nitrate taxation dispute between Bolivia and Chile, with Peru being drawn in due to its secret alliance with Bolivia. But historians have pointed to deeper origins of the war, such as the interest of Chile and Peru in the nitrate business, the long-standing rivalry between Chile and Peru, as well as political and economical disparities between Chile and Peru and Bolivia. On February 14, 1879, Chile's armed forces occupied the Bolivian port city of Antofagasta, subsequently war between Bolivia and Chile was declared on March 1, 1879, and between Chile and Peru on April 5, 1879.

Battles were fought in the Pacific Ocean, the Atacama Desert, the Peruvian deserts, and the mountainous interior of Peru. For the first five months, the war played out in a naval campaign, as Chile struggled to establish a marine resupply corridor for its forces in the world's driest desert. Afterwards, Chile's land campaign bested the Bolivian and Peruvian armies. Bolivia withdrew after the Battle of Tacna, on May 26, 1880. Chilean forces occupied Peru's capital Lima in January 1881. Remnants and irregulars of the Peruvian army waged a guerrilla war but could not prevent war-weary Peruvian factions from reaching a peace deal with Chile involving territorial cessions.

Chile and Peru signed the Treaty of Ancn on October 20, 1883. Bolivia signed a truce with Chile in 1884. Chile acquired the Peruvian territory of Tarapac, the disputed Bolivian department of Litoral (turning Bolivia into a landlocked country), and temporary control over the Peruvian provinces of Tacna and Arica. In 1904, Chile and Bolivia signed the Treaty of Peace and Friendship, which established definite boundaries. The 1929 TacnaArica compromise gave Arica to Chile and Tacna to Peru.

Chile, officially the Republic of Chile, is a country in the western part of South America. It occupies a long, narrow strip of land between the Andes to the east and the Pacific Ocean to the west. Chile covers an area of 756,096 square kilometers (291,930 sq mi), with a population of 17.5 million as of 2017. Chile is the southernmost country in the world, the closest to Antarctica, and share land borders with Peru to the north, Bolivia to the north-east, Argentina to the east, and the Drake Passage in the far south. Chile also controls the Pacific islands of Juan Fernández, Isla Salas y Gómez, Desventuradas, and Easter Island in Oceania. It also claims about 1,250,000 square kilometers (480,000 sq mi) of Antarctica under the Chilean Antarctic Territory. The country's capital and largest city is Santiago, and its national language is Spanish.

Spain conquered and colonized the region in the mid-16th century, replacing Inca rule, but failing to conquer the independent Mapuche who inhabited what is now south-central Chile. In 1818, after declaring independence from Spain, Chile emerged in the 1830s as a relatively stable authoritarian republic. In the 19th century, Chile saw significant economic and territorial growth, ending Mapuche resistance in the 1880s and gaining its current northern territory in the War of the Pacific (1879–83) after defeating Peru and Bolivia. In the 20th century up to the 1970s Chile saw a process of democratization, rapid population growth and urbanization and increasing reliance on exports from copper mining for its economy. During the 1960s and 1970s, the country experienced severe left-right political polarization and turmoil. This development culminated with the 1973 Chilean coup d'état that overthrew Salvador Allende's democratically elected left-wing government and instituted a 16-year right-wing military dictatorship of Augusto Pinochet that left more than 3,000 people dead or missing. The regime ended in 1990 after a referendum in 1988 and was succeeded by a center-left coalition which ruled until 2010.

Chile is a developing country with a high-income economy and ranks 43rd in the Human Development Index. It is among the most economically and socially stable nations in South America, leading Latin America in rankings of competitiveness, per capita income, globalization, state of peace, economic freedom, and low perception of corruption. Chile also ranks high regionally in sustainability of the state, democratic development, and has the lowest homicide rate in the Americas after Canada. It is a founding member of the United Nations, the Community of Latin American and Caribbean States (CELAC) and the Pacific Alliance, and joined the OECD in 2010.