Image copyright PA Image caption El Salvador's team ahead of the deciding match against Honduras on 27 June 1969

In 1969, El Salvador and Honduras fought a four-day conflict that cost thousands of lives and displaced thousands more - a bloody struggle still remembered as the Football War.

It was 2-2 after 90 minutes at the Azteca Stadium in Mexico City. This was the third game between Honduras and El Salvador in as many weeks; qualification for the 1970 World Cup in Mexico was at stake, a competition neither country had ever competed in before.

Honduras won the first leg 1-0 in their capital Tegucigalpa, only for El Salvador to triumph 3-0 at home in San Salvador. Reports of violence marred both games.

As the deciding match entered the 11th minute of extra time, El Salvador's Mauricio "Pipo" Rodríguez sprinted into the penalty area to meet a cross and slid the ball past Honduran goalkeeper Jaime Varela.

"When I scored the goal, I thought it's not possible with so little time left for them to draw with us," Rodríguez says, 50 years after the critical match. "I was sure with that goal we would win."

El Salvador held on to triumph 3-2. The players hugged, shook hands, and left the pitch.

Within three weeks, their countries were at war.

El Salvador - roughly the size of Wales - had a population of about 3 million in 1969. Most of the country was controlled by a landowning elite, leaving very little space for poorer Salvadoran farmers. Honduras - similarly dominated by a small number of landowners - was five times as large, and in the same year had a population of about 2.3 million.

As a result, throughout the 20th Century, Salvadorans had been moving to Honduras to take advantage of the more available farmland, and to work for the US fruit companies which operated in the country. Roughly 300,000 were living in the neighbouring state by that year.

El Salvador's small landowning elite had supported the mass emigration, as it eased pressures on their land and calls for it to be redistributed. But the migrant arrivals caused resentment among Honduran peasants who were fighting for more land from their own elite at the time. So the Honduran government passed an agrarian land reform law to ease the tensions.

The authorities focused not on the land owned by the elites and US fruit companies however, but on lands settled by the migrants. Honduran President Oswaldo López Arellano began to deport thousands of Salvadorans home.

On top of this were simmering land and sea border disputes, including over a number of islands in the Gulf of Fonseca - a small body of water on the Pacific Coast shared between both countries and Nicaragua.

"To a very large extent this war was all about available land, too many people in too small a place, and the ruling oligarchy simply fuelling the fire in connection with the press," said Dan Hagedorn, author of The 100 Hour War, which details the conflict.

Image copyright AFP Image caption Thousands of Salvadorans left Honduras, and the government struggled to cope with the influx

Salvadoran President Fidel Sánchez Hernández's government struggled to cope with the large numbers of returning migrants, while the country's land owners began pushing for military action, and inflammatory reports about persecution and even allegations of rape and murder appeared in the newspapers.

It was in the midst of this rising anger that the countries met on the football pitch.

"There were much bigger political matters," said Ricardo Otero, a Mexican sports journalist at broadcaster Univision. "But there was this coincidence of three games to qualify for the 1970 World Cup. It didn't help. Football here [in Latin America] is very, very passionate - for good and for bad."

Image copyright Bettmann/Getty Images Image caption Honduras also interned Salvadoran migrants

"We felt we had a patriotic duty to win for El Salvador," Rodríguez said. "I think we were all afraid of losing, because in those circumstances it would have been a dishonour that followed us for the rest of our lives.

"What we didn't know was the significance of that win and the historical importance of that goal - that it would be used as a symbol of a war."

'What the heck is going on?'

On 27 June, as the players prepared for that evening's deciding game in Mexico's capital, El Salvador severed diplomatic ties with Honduras.

Interior Minister Francisco José Guerrero said close to 12,000 Salvadorans had left Honduras after the second match, with UK newspaper the Guardian reporting that he blamed "alleged persecution… stemming from an international football match".

The day after the game, US news agency UPI ran a piece with the headline "Soccer 'War' Won by El Salvador, 3-2". According to the report, 1,700 Mexican police attended the game to prevent violence and Salvadoran fans chanted "murderers, murderers" from the stands.

"People abroad stigmatised it as the goal that started the war," said Rodríguez. "The war would have happened with or without that goal."

Image copyright AFP/Getty Image caption Honduras and El Salvador both used World War II-era US-built planes during the brief war

In the days that followed, border skirmishes intensified. On 14 July, El Salvador ordered its forces to invade Honduras, and launched warplanes to bomb the country.

Mr Hagedorn, who was serving in the US Army at the time in the Panama Canal Zone, sat at a desk near to his base's teleprinter. "Whenever we would get any kind of an alert, that machine would start chattering and printing stuff out automatically, on its own," he recalled.

"I remember it vividly - it started chattering and it kept on going, kept on going. I said, 'What the heck is going on?'. So we went over and took a look at it - that's when we realised the Salvadorans had invaded Honduras."

You may also be interested in:

Polish journalist Ryszard Kapuscinski was one of the few foreign correspondents in the area when the invasion began. By his own account, he filed some of the first reports of the conflict from Tegucigalpa that night - taking his turn to use the country's only teleprinter machine, after President López Arellano, who was communicating with his ambassador in the US about the invasion.

Kapuscinski later wrote of his time in Honduras and immortalised the conflict's name in his 1978 memoir, The Soccer War. In it, he recounts seeing graffiti saying "Nobody beats Honduras" and "We shall avenge 3-0".

By the time the Organization of American States managed to arrange a ceasefire on 18 July, it was thought about 3,000 people had died - the majority Honduran civilians. Many more were displaced by the fighting. Under international pressure, El Salvador withdrew its forces from Honduras in August.

Image copyright AFP/Getty Image caption Veterans still gather to commemorate the conflict

And the pain did not end there. Trade ceased between both nations for decades and the border was closed.

Dr Mo Hume, lecturer at the University of Glasgow, said the domestic problems in El Salvador that caused the Football War - a small landowning elite and large numbers of dispossessed farmers - would affect the country for decades to come.

"The bigger socioeconomic questions that were part and parcel of the football war were the ultimate cause of [El Salvador's] civil war from 1979 to 1992," she said. More than 70,000 people are thought to have died in the conflict.

Image copyright AFP/Getty Image caption A memorial was erected in Tegucigalpa to commemorate the war

There are still tensions between El Salvador and Honduras. Border disputes between both sides continue to this day, despite an International Court of Justice (ICJ) ruling on the issue . But for the man who scored the fateful goal for El Salvador, it was not rancour that he remembered.

"For me, that goal will always be a source of sporting pride," said Rodriguez, who is now 73. "What I am sure of is that the authorities and politicians made use of our sports victory to glorify El Salvador's image."

And despite what followed, Rodriguez said the El Salvador team retained an immense "appreciation and respect" for their Honduran opponents. "Neither from the Honduras players nor from our side were the games between enemies, but between sports rivals," he said.