The War of the Pacific left Lima occupied and Peru split among parallel governments. Miguel Iglesias, proclaimed at the Assembly of Montán, demanded peace even at the cost of territory. Andrés Avelino Cáceres opposed him and was defeated at Huamachuco on 10 July 1883. Chile recognised Iglesias. The plenipotentiaries were Jovino Novoa Vidal for Chile, and José Antonio de Lavalle, foreign minister, and Mariano Castro Zaldívar for Peru. The bases were set on 3 May 1883.

On 20 October 1883, in Lima — the text had been prepared at Ancón, near the capital — the Treaty of Peace and Friendship between the republics of Chile and Peru was signed. Article 1 restores peace. Article 2 cedes to Chile, “in perpetuity and unconditionally”, the littoral province of Tarapacá, between the Camarones river in the north, the Loa in the south, Bolivia in the east and the Pacific in the west. Ratifications were to be exchanged in Lima within 160 days. The Chilean senate approved in January 1884; Peru’s National Assembly ratified on 8 March 1884, by 99 votes to 6.

Article 3, the most contested, leaves the provinces of Tacna and Arica, between the Sama and Camarones rivers, in Chile’s possession for ten years from ratification, under Chilean law and authorities. A plebiscite was then to decide their fate; the winner would pay the other ten million pesos in Chilean silver or Peruvian soles. The special protocol for the vote was never applied. The status stood until the Treaty of Lima of 1929: Tacna returned to Peru, Arica remained with Chile, with an indemnity of six million dollars.

Articles 4 to 10 govern guano and nitrate. Chile sells one million tons of guano and shares half the net proceeds with Peruvian creditors whose titles were secured on guano; deposits later found in the ceded territories belong exclusively to Chile. The Lobos Islands remain under Chilean administration until that million tons is exhausted, then revert to Peru, which receives half the proceeds of their guano. Article 8 states that Chile recognises no other claims on the new territories beyond those already accepted.

Article 11 keeps, until a special commercial treaty, the mercantile relations that existed before 5 April 1879. Article 12 sets up an arbitral tribunal for compensation to Chilean citizens expelled or whose property was seized. Article 13 recognises the administrative and judicial acts of the Chilean military occupation.

Resentment fed the Peruvian civil war of 1884–1885, which overthrew Iglesias. The Castellón–Elías protocol of 8 January 1890 gave Peru the guano of Tarapacá, on condition it be handed to the creditors. A clause of the Treaty of Lima required Chile not to cede former Peruvian territories to other states without Lima’s consent; in 1975 Peru rejected a proposed land swap with Bolivia.

Sources: Treaty of Ancón; Wikisource, Tratado de Ancón.