For Donald Trump, the band of men, women and children who have come together in Honduras to help each other to get to the United States – quaintly know as the “migrant caravan” – is a threat to American sovereignty, demanding a phalanx of troops to defend the border. “This is an invasion of our country, and our military is waiting for you!” he tweeted last week. “We will defend our country.”

The notion of a grievous threat to the homeland emerging from the impoverished countries of Central America is not, for once, a peculiarly Trumpian fantasy. Some 32 years ago, when Central America was racked by wars and revolutions, president Ronald Reagan warned that unless the Sandinistas were overthrown, Nicaragua would become “a privileged sanctuary for terrorists and subversives just two days’ driving time from Harlingen, Texas”.

I was surprised to find that 74 per cent of Harlingen’s citizens voted for Hillary Clinton in 2016, so they are unlikely to take too much notice of Trump’s bombast.

They were probably equally oblivious to the possible arrival of a Spanish-speaking guerrilla army in the 1980s; when Reagan waged his proxy battles in Central America a substantial number of Americans did not know which side the US was on. But the two alarmist appeals are both symptomatic of how it is only in moments of crisis that Central America itself invades the American imagination.

US presidents from Kennedy onwards sought elusive moderate change, but ended up relying on repressive regimes to hold back the threat of violent revolution

The United States only really began paying attention to Central America in the 19th century when the isthmus appeared to be the ideal site for a canal from the Atlantic to the Pacific. It was mainly concerned that no other power should be able to meddle in what it began to refer to as its “backyard”.

A Honduran migrant taking part in the caravan holds up a sign reading “Thank you Mexico for opening your hearts to us”, while waiting to cross the border from Ciudad Tecun Uman in Guatemala, to Ciudad Hidalgo, Mexico, recently. File photograph: Orlando Sierra/AFP/Getty Images

In the first half of the 20th century the US swung between imperious intervention and paternal indifference, sending in the marines to dampen local political squabbles and then ignoring the unsavoury surrogates installed to pacify dissent.

Military rule

After 1945 a wave of democratic change, often supported by communist activists, propelled the region into the Cold War. In 1954, cheered on by American-owned United Fruit, which stood to lose some of its banana plantations in a land reform, the Eisenhower administration overthrew a reformist government in Guatemala, inaugurating decades of military rule.

After Castro took power in Cuba, US presidents from Kennedy onwards sought elusive moderate change, but ended up relying on repressive regimes to hold back the threat of violent revolution.

By the 1980s that threat could be contained no longer. The Sandinistas overthrew the Somoza dictatorship in Nicaragua, and guerrilla armies threatened to succeed in El Salvador and Guatemala.

Shortly before he took office Reagan declared that Central America “was rapidly becoming a communist lake in what should be an American pond”. He vowed to roll back communism so that democracy would flourish.

More aid was provided to the Contra army he backed to defeat the Sandinistas than had been sent to all five Central American governments in the previous 20 years. Grandiose promises were made about what would happen once the left-wing menace was vanquished. One of Reagan’s top diplomats, Thomas Enders, insisted that “the basic policy of the United States is to try to help resolve the problems of frail government institutions, of poverty, and of underdevelopment that create vulnerabilities to this form of aggression”.

Instead of the flourishing democracies promised by Reagan, there are failing states

But when the wars began to end American interest faded almost overnight. Despite bitter battles between the White House and Congress about aid to the Contras, Reagan’s vice-president, George Bush hardly mentioned Central America in his own presidential election campaign in 1988.

Honduran migrants heading in the caravan towards the US, in Tapachula, Chiapas state, Mexico. File photograph: Pedro Pardo/AFP/Getty Images

Peace was breaking out and Central America was not an important component in the new world order.

In 1991, when Violeta Chamorro, the hero who had defeated the Sandinistas the previous year, was accorded the honour of addressing a joint session of Congress, there were an embarrassing number of empty seats in the chamber. By the 1990s the countries of Central America had returned to being forgotten banana republics.

Abandonment

The scale of the abandonment was startling. In 1985, at the height of the proxy wars, Central America received $1.2 billion in US assistance; in 1998 President Bill Clinton proposed $169 million.

Under Clinton a policy began which had disastrous consequences. Hundreds of thousands of Salvadorans, the children of refugees from the war in the 1980s, many of them now with criminal records, were deported. Back in El Salvador they reconstituted the street gangs they had formed in Los Angeles. MS-13, the best known and most violent of these gangs, became a powerful force, spreading its influence from El Salvador to Guatemala and Honduras.

The years of American neglect of its backyard are now bearing fruit. Instead of the flourishing democracies promised by Reagan, there are failing states.

In El Salvador, Honduras and Guatemala, now known as the “northern triangle” – a sure sign of their reincorporation into language of strategic risk – transnational drug and criminal gangs effectively control territory. Police forces are too poorly resourced to cope – they’ve been cowed or suborned.

In many cases – particularly in Guatemala – former military officers are now kingpins of organised crime. Murders, kidnappings and disappearances are occurring at a rate which surpasses the wars of the 1980s. According to the UN, half a million people are fleeing the northern triangle every year; the “migrant caravan” is merely the most televisual token of a vast migrant flow.

Chanting “America First” is not enough to dispel the blowback of history.

Maurice Walsh teaches history at Goldsmiths, University of London. He was a foreign correspondent in Mexico and Central America in the 1980s and 1990s