Central American conflict alarmed Washington
One of the most interesting facets of Ronald Reagan's presidency was his apparent obsession with Central America.
President Reagan became convinced that the Sandinistas' 1979 victory in Nicaragua could spark off revolution throughout the region and threaten the security of the United States.
For many years, Central America was dismissed as a small, backward and inconsequential part of the world.
It had got rid of Spanish colonial rule in 1821 but had then failed to establish a solid system of democratic government, becoming bogged down in a series of military dictatorships.
In 1954, Jacobo Arbenz was elected president of Guatemala on the back of a programme of wide-ranging social reform. But his rhetoric alarmed Washington, which became fearful of losing its dominance in the region, and the US backed a coup to overthrow him.
Central America sank back into its old role of archetypal banana
republic, located firmly in the US backyard.
All this changed in 1979. In Nicaragua, the left-wing Sandinista
revolutionaries overthrew the corrupt and repressive government of General Somoza.
Reagan feared the spread of communism
The Sandinistas never defined themselves as communist. Indeed, they said they favoured a mixed economy and political pluralism. But they took several measures that alarmed Washington.
They set up the clearly political Sandinista People's Army, to replace the National Guard. And they began to redistribute wealth, expropriating large estates.
This was enough to alarm Ronald Reagan, who had become US president in 1981. Reagan became implacably opposed to the Sandinista government, particularly after social unrest spread to neighbouring countries.
In El Salvador, guerrilla fighters from the Farabundo Marti Liberation Front (FMLN) became involved in a bitter conflict with the Salvadoran army. And a long and vicious civil war between the army and left-wing rebels erupted in Guatemala.
Fearful of what he saw as communism spreading across the region, Reagan increased military aid to the beleaguered governments. El Salvador alone received $3bn, a vast amount for a small nation.
Daniel Ortega was a celebrated Sandinista
At the same time, Reagan began to do all he could to engineer the overthrow of the Sandinistas - the only left-wing government in power in the region.
From the early 1980s, two groups of armed opponents to the Sandinistas remained active. Based in Costa Rica to the south, former members of the National Guard made forages into Nicaragua.
Initially numbering only 2000, they recruited small farmers disaffected by the Sandinistas' programme of agrarian reform.
At the same time, a disillusioned Sandinista commander, Eden Pastora, set up an opposition base in Honduras to the north. Both groups became known as the "contras", that is counter-revolutionary forces.
In the early years, Reagan quite openly allocated funds to the contras and to the CIA for the purpose of destabilising the Sandinista regime. But, in time, opposition to this funding grew among the US public.
Colonel Oliver North was implicated in the Iran-Contra affair
In 1986, the Reagan government, secretly and illegally, transferred to the contras the proceeds of clandestine sales of military equipment supplied to Iran.
When journalists exposed what was going on, congressional opposition to the funding of the contras grew. And eventually Washington was forced to stop.
At first sight, it would seem that Reagan's policies failed. The Sandinistas were not overthrown militarily and the left-wing guerrillas were not defeated in either El Salvador or Guatemala - though here they were seriously weakened.
But, indirectly and almost fortuitously, Reagan achieved his underlying aim, which was to stop socialism spreading to the rest of Central America.
Made unpopular by the need to fight a long and costly war against the US-backed contras, Sandinistas were unexpectedly voted out of office in elections in February 1990.
The guerrillas failed to achieve military victory
And in El Salvador and in Guatemala the guerrillas failed to
achieve a military victory. Both forces eventually negotiated peace agreements and laid down their arms.
A decade after the end of these wars, it seems almost unbelievable that these tiny countries could have been seen by Reagan as a major threat to US national security.