Chile–Peru relations are the historical and current bilateral relations between the adjoining South American countries of the Republic of Chile and the Republic of Peru. Peru and Chile have shared diplomatic relations since at least the time of the Inca Empire in the 15th century. Under the Viceroyalty of Peru, Chile and Peru had connections using their modern names for the first time. Chile aided in the Peruvian War of Independence by providing troops and naval support.

In the 19th century, as both countries became independent from Spain, Peru and Chile shared peaceful relations resulting from the formation of economic and political ties that further encouraged good relations. During the War of the Confederation (1836–1839), Chile and dissident Peruvians formed a military alliance to liberate and reunite the republics of South Peru and North Peru from the Peru-Bolivian Confederation. Later, during the Chincha Islands War (1864–1866), Peru and Chile led a united front against the Spanish fleet that occupied the Peruvian Chincha Islands and disrupted commerce in the South Pacific. In the 1870s, during the early conflicts prior to the War of the Pacific, Peru sought to negotiate a peaceful diplomatic solution between Bolivia and Chile. Although Peru had a secret defensive alliance with Bolivia, Peru did not declare war on Chile even after Chile invaded the Bolivian port of Antofagasta. War was not declared formally until Chile declared war on both Peru and Bolivia in 1879. Peru declared war on Chile the following day. The war resulted in a Chilean invasion of Peru and the destruction of various Peruvian buildings, cities, a major raid and a two-year occupation of the capital of Peru, Lima. The ultimate result of the war left a deep scar on the three societies involved, and the relations between Peru and Chile soured for over a century, although relations were stabilized to some extent by the 1929 Treaty of Lima.

In 1975, the two countries once again found themselves on the verge of war, but armed conflict between left-wing Peru and right-wing Chile was averted. Relations remained tense due to alliances during and after the 1995 Cenepa War between Peru and Ecuador, but they have improved gradually, with the neighboring countries entering into new trade agreements in the 21st century.

History of diplomatic relations

Rule under the Spanish Empire

After the conquest of Peru by Francisco Pizarro and his troops, Diego de Almagro went on an expedition to explore the lands of Chile that he had been assigned. After finding no gold and little more than farming societies and the fierce attacks of the Mapuche, Diego de Almagro returned to Peru with a broken army seeking to gain some sort of power and prestige. After attempting to overthrow Pizarro in Cusco, Diego de Almagro failed and was sentenced to death.

Some time after the events of Almagro, Pedro de Valdivia led an expedition from Peru to Chile, then called "Nuevo Toledo", that ended in the creation of Santiago de la Nueva Extremadura and the Captaincy General of Chile. The lack of the treasures and natural resources that the Spanish valued (such as gold and silver) for their economy and the constant raids from the local Mapuche made Chile a highly undesirable place. As a result, during the colonial era Chile was a poor and problematic province of the Viceroyalty of Peru, and it took a while before settlers would begin to find the other natural resources of the lands. In order to protect themselves from further attacks and full-scale revolts (such as the Arauco War), and retain official control of the lands, the Viceroyalty of Peru had to finance the defence of Chile by constructing extensive forts such as the Valdivian fort system. In order to prevent other European nations from making colonies in these sparsely populated areas, the trade of Chile became restricted to directly providing supplies, such as tallow, leather, and wine, to Peru. Moreover, a series of young officers in Chile made careers as governors of this territory, and a few even made it all the way to getting appointed viceroys of Peru (such as Ambrosio O'Higgins and Agustin de Jauregui y Aldecoa). This exchange of goods and supplies between both regions became the first recorded trade of both future nations.

Wars of Independence (1810–1830)

A series of excellent historical relations followed these times, especially during this period of independence from Spain. From the start of the Spanish conquest, the Incas (and later their mestizo descendants) kept up the struggle for independence from Spain in the viceroyalty of Peru. A series of revolts by people such as Túpac Amaru II kept up the spirits for independence in Peru and the rest of South America. Nonetheless, Chile's remoteness greatly helped in making it become one of the first nations to declare independence with the so-called Patria Vieja. Even as this first attempt was thwarted by the Spanish, the spirit of independence continued in Chile. Later, with the aid of José de San Martín and the Argentine army, Chile once again became an independent nation. Meanwhile, Peru remained as a stronghold for the remaining Spanish forces whom sought to form a force large enough to re-conquer their lost territories. Jose de San Martin's army which included some Chilean soldiers marched into Lima and proclaimed the independence of Peru. Soon after that, more reinforcements arrived from the Peruvian population and commanders such as Ramon Castilla began to prove themselves as excellent tacticians. The arrival of Simón Bolívar and the subsequent victories at the battles of Junin and Ayacucho finally served as the end of Spanish rule in South America.

Afterwards, several of these war heroes helped in forming good relations between the newly formed nations as they became prominent politicians in their nations. People like Bernardo O'Higgins, Ramon Freire, Agustin Gamarra, and Ramon Castilla would often seek aid and refuge in either Peru or Chile. After the wars of independence, the mutual concerns of both nations mainly revolved around consolidating their nations as sovereign states. Peru and Chile found themselves in one of the friendliest of positions as they shared no territorial claims and also due to their historic trade. The cultures of both nations also kept close ties as the popular Peruvian Zamacueca evolved in Chile as the Cueca and in Peru as the yet-to-be named Marinera. Still, economic disputes and greed would soon destroy that which was apparently one of the best international relations in the world at that time.

Formation of Peru-Bolivia Confederation (1836)

The formation of large, united South American nations was a popular idea that Simón Bolívar and a series of other prominent leaders of that time sought to form. Nonetheless, the problems began when the leaders could not agree where the center of power of this union would be located. Many of the leaders would soon figure that this union would not happen, and many (such as José de San Martín) went back to their regular lives in disappointment. Yet, in order to expand his personal dream of Gran Colombia, Bolívar allowed Sucre to form the nation of Bolivia in Upper Peru. This action led to much controversy as the republican government of Peru sought to re-consolidate its power in a region that had belonged to them under the Spanish authorities. This period of time was filled with much political intrigue, and soon a war erupted between Peru and Gran Colombia. The political turmoil in Peru stopped Bolivar's plans to reach Bolivia and keep expanding Colombia, but the warfare ended indecisively. The aftermath of this left Peru consolidated as a state, Bolivia formally recognized as a separate entity by Peru, and the beginning of the dissolution of Gran Colombia into the nations of the New Granada (today, Colombia), Ecuador, and Venezuela.

Even though Peru had recognized the independence of Bolivia, the national sentiment among the Peruvian society and its politicians greatly influenced the events that would soon take place. Agustin Gamarra and Andres de Santa Cruz were the leading proponents of a union between these two nations during the 1830s, but each had different views on which nation would command the union. While Santa Cruz favored a Bolivian-led confederation, Gamarra sought to annex Bolivia into Peru. A series of political conflicts in Peru would soon give Santa Cruz the chance to start his plans, and led an invasion of Peru claiming his intentions were to restore order. A series of Peruvians felt betrayed by their own government as the president and several leaders of congress allowed Santa Cruz to divide Peru into two nations: North Peru and South Peru. The Peru-Bolivian Confederation was soon formed, and several leading powers of the day (Such as France and Great Britain) and the United States recognized the nation's existence. Politicians in South America would also form divided opinions about this new nation, but due to the political conflicts in the former states of the Greater Colombia, the main turmoil to this idea centered in Southern South America.

Among the most heavily involved in this situation was the Republic of Chile. Famous Chilean leaders such as Bernardo O'Higgins and Ramon Freire openly favored the ideas of the newly self-appointed "Grand Marshal" Santa Cruz, but at the same time they opposed the regime that at that moment governed Chile. The government in Chile was also deeply divided as to what they should do about this new nation. A series of Peruvians, including Agustin Gamarra and Ramon Castilla, saw the situation as an invasion of Bolivia into Peruvian territory, and they went into exile in Chile in order gain support from the Chilean government. Nevertheless, as far as things concerned Chile, Peru still owed a debt to the Chilean government as a result of this government helping in the liberation of Peru from Spain, and both nations were still under a commercial competition as to which port would become the most important in the southern Pacific coasts (Callao in Peru or Valparaíso in Chile). Moreover, Chile saw the creation of this new Peru-Bolivia government as a threat to Chilean independence and sovereignty due to the major influence that the combined territories of Peru and Bolivia were beginning to form in the world, and the many important Chilean figures exiled in Peru that sought to take over and change the current Chilean governmental administration. Even though the Peru-Bolivian Confederation was still very young, the economic and infrastructure plans of Grand Marshal Santa Cruz had made a major impact in the economy of Bolivia, and the nation of South Peru also began to greatly benefit as a result of being free from the control of Lima and staying under the economic policies of Santa Cruz. The only state from this union that did not truly benefit was North Peru, and soon this state would begin to provide the greatest support for Chilean intervention into this situation.

War of the Confederation (1836–1839)