Both El Salvador and Peru share a common history in the fact that both nations were once part of the Spanish Empire.
During the Spanish colonial period, El Salvador was governed from the Viceroyalty of New Spain in Mexico City while Peru was then part of the Viceroyalty of Peru and administered from Lima.
In 1824, Peru obtained its independence from Spain.
In 1841, El Salvador obtained its independence after the dissolution of the Federal Republic of Central America.
On 10 June 1857, both nations established diplomatic relations.

In July 1966, El Salvador and Honduras went to war for 100 hours as a result of a football (soccer) match, also known as the Football War.
Although the war was brief, relations between both nations remained strained for more than a decade.
In 1977, both nations appointed former Peruvian President, José Bustamante y Rivero, as a mediator for peace negotiations between El Salvador and Honduras.
On 30 October 1980, eleven years after the war, the two nations signed a peace treaty in Lima, Peru and agreed to resolve the border dispute over the Gulf of Fonseca and five sections of land boundary through the International Court of Justice (ICJ).

In 1979, the Salvadoran Civil War broke out in El Salvador.
From 1982, Secretary-General of the United Nations, Javier Pérez de Cuéllar (originally from Peru), played a big role in mediating during the war.
As a result, Peruvian President Alan García hosted Salvadoran government officials and FMLN rebels to Peru for peace discussions.
In 1989, Secretary-General Javier Pérez de Cuéllar appointed fellow Peruvian, Álvaro de Soto, as Personal Representative for the Central American Peace Process, and Soto headed the negotiations that brought an end to the decade-long civil war in El Salvador.
In January 1992 the Chapultepec Peace Accords were signed by the Salvadoran government and rebels in Mexico City and thus concluded the end of the war in El Salvador.

Since the end of the civil war, relations between El Salvador and Peru have remained close.
Both nations participate in several regional multilateral organizations and there have been numerous reunions between leaders of both nations.
In November 2001, Salvadoran President Francisco Flores paid a visit to Peru to attend the 11th Ibero-American Summit held in Lima.
In October 2008, Peruvian President Alan García paid a visit to El Salvador to attend the 18th Ibero-American Summit in San Salvador.

In 2017, both nations celebrated 160 years of diplomatic relations.
Both El Salvador and Peru share a common history in the fact that both nations were once part of the Spanish Empire. During the Spanish colonial period, El Salvador was governed from the Viceroyalty of New Spain in Mexico City while Peru was then part of the Viceroyalty of Peru and administered from Lima. In 1824, Peru obtained its independence from Spain. In 1841, El Salvador obtained its independence after the dissolution of the Federal Republic of Central America. On 10 June 1857, both nations established diplomatic relations.
In July 1966, El Salvador and Honduras went to war for 100 hours as a result of a football (soccer) match, also known as the Football War. Although the war was brief, relations between both nations remained strained for more than a decade. In 1977, both nations appointed former Peruvian President, José Bustamante y Rivero, as a mediator for peace negotiations between El Salvador and Honduras. On 30 October 1980, eleven years after the war, the two nations signed a peace treaty in Lima, Peru and agreed to resolve the border dispute over the Gulf of Fonseca and five sections of land boundary through the International Court of Justice (ICJ).
In 1979, the Salvadoran Civil War broke out in El Salvador. From 1982, Secretary-General of the United Nations, Javier Pérez de Cuéllar (originally from Peru), played a big role in mediating during the war. As a result, Peruvian President Alan García hosted Salvadoran government officials and FMLN rebels to Peru for peace discussions. In 1989, Secretary-General Javier Pérez de Cuéllar appointed fellow Peruvian, Álvaro de Soto, as Personal Representative for the Central American Peace Process, and Soto headed the negotiations that brought an end to the decade-long civil war in El Salvador. In January 1992 the Chapultepec Peace Accords were signed by the Salvadoran government and rebels in Mexico City and thus concluded the end of the war in El Salvador.
Since the end of the civil war, relations between El Salvador and Peru have remained close. Both nations participate in several regional multilateral organizations and there have been numerous reunions between leaders of both nations. In November 2001, Salvadoran President Francisco Flores paid a visit to Peru to attend the 11th Ibero-American Summit held in Lima. In October 2008, Peruvian President Alan García paid a visit to El Salvador to attend the 18th Ibero-American Summit in San Salvador.
In 2017, both nations celebrated 160 years of diplomatic relations.
El Salvador–Peru relations