In 1866, Peru won a quick war against Spain but was humiliated by Chile in the Pacific War (1879-1883) that caused the loss of the very lucrative salt mines in the north of the Atacama desert. Peru went also to war with Ecuador because of a border problem in 1941. The 1942 Rio de Janeiro Treaty gave the northern area of Mara˝ˇn River to Peru but the decision was hardly contested by Ecuador.
A guerrilla inspired from the Cubans appeared in 1965 directed by the National Liberation Army was unsuccessful, but a series of national strikes and a violent insurrection of the Maoist guerrillas of the (Sendero Luminoso) generated a political instability in the years 1980. Another guerrilla group, the Revolutionary Movement Tupac Amaru (MRTA), was also reinforced during this period. However, the victory in the presidential elections of July 1990 of Alberto Kenyo Fujimori (wrongly named El Chino-the Chinese because of his Japanese origins) against the Peruvian novelist Mario Vargas Llosa and the capture in 1992 if the MRTA and Sendero Luminoso leaders gave the hope of an important period of peace. Unfortunately, the confrontations in February 1995 with Ecuador because of the border conflict needed the intervention of international observers to supervise the conflict area. The main social problems were still unemployment and poverty, despite the fast economic growth of Peru. Fujimori was reelected on April 1995 with 64,42% of votes, in spite of the notoriety of another candidate, the former general secretary of the United Nations, Javier Perez de Cuellar, with only 21,80%.