The Treaty of Peace and Friendship of 1904 between Chile and Bolivia was signed in Santiago de Chile on October 20, 1904, in order to delineate the boundary through 96 specified points between Cerro Zapaleri and Cerro Chipe and to regulate the relations between the two countries 20 years after the end of the War of the Pacific.
The Bolivia–Chile boundary has a length of about 861 kilometres (535 mi) and is demarcated by pillars located in the Andes. Most of the boundary consists of straight-line segments between high mountain peaks. From the Argentina–Bolivia–Chile tripoint of Cerro Zapaleri, it extends northward through more than five degrees of latitude to the Peru–Bolivia–Chile tripoint at 17° 29' 55.0" S. latitude and 69° 28' 28.8" W. longitude.
When Bolivia became independent from Spain on August 6, 1825, it took possession of the territories that corresponded to its colonial administration in accordance with the uti possidetis juris of 1810. Bolivia claimed the maritime territory westward from the Andes to the Pacific Ocean between the Río Salado on the south and the Río Loa on the north, which included part of the Atacama Desert. In 1842 Chile made claims to the desert area following the discovery and exploitation of nitrate deposits. With negotiations extending over a period of several decades, a decision was reached finally between Bolivia and Chile in a treaty dated August 10, 1866. Article I of the treaty of 1866 stated that "the line of demarcation of boundaries between Chile and Bolivia in the desert …shall henceforth be, the parallel of latitude 24 degrees South." On December 5, 1872, a subsequent treaty confirmed the 24th parallel as the boundary between the two states. In accordance with various other treaties, Bolivia was given an equal share of revenues from guano deposits located in Chilean territory between the 24th and 25th parallels; and Chile had the same concession in Bolivian territory between the 24th and 23rd parallels, which area included the port of Antofagasta.