Two veterans of Cold War conflicts that ravaged Central America in the 1980s won elections in Nicaragua and Guatemala on Sunday, highlighting the heavy footprint the wars left on the region.

Daniel Ortega, a former Marxist revolutionary leader, won a second consecutive term as Nicaragua's president by a landslide while hardline conservative and retired army general Otto Perez ended four years of leftist rule in Guatemala.

The victories for both Ortega and Perez had been widely expected, and underline the diverging paths the two largely agrarian nations have taken since the Cold War, whose ideological tensions forged a generation of politicians.

While Guatemala, supported initially by the United States, ruthlessly crushed leftist guerrillas in a 36-year civil war, Ortega's left-wing Sandinista party survived a U.S.-backed rebellion in the 1980s only to be voted out in 1990.

The poorest country in Central America, Nicaragua has been relatively stable since then and it has progressed economically under Ortega, who rode out 16 years in opposition to recapture the presidency five years ago, resolving to combat poverty.

In wealthier Guatemala, wounds from the civil war still fester and its weak government has allowed brutal street gangs and Mexican drug cartels to run rampant. The country now boasts one of the highest murder rates in the Americas.

Slow progress has been made implementing Guatemala's 1996 peace accords and rising violence has now brought an army man to power for the first time since democracy was returned in 1986, despite concerns about the army's role in the conflict.

In Guatemala this is reaction against a failed state, said George W. Grayson, a Latin America expert at the College of William & Mary in Virginia. So it wants a strong law and order candidate to bring peace and tranquillity. Whereas Ortega is really quite popular. He has connected with the people.

Perez won with a pledge to cut in half homicide rates of more than 41 per 100,000 inhabitants, three times the rate in Nicaragua and eight times that of the United States. Yet whether he will also allow former comrades inside the army to face prosecution for war-time atrocities remains to be seen.

UNKNOWN QUANTITY

Ortega, for years a pariah to the United States, has allied himself closely with Hugo Chavez, the socialist president of Venezuela, whose oil wealth has helped to support welfare programs for the poor majority in Nicaragua.

Ortega first took power as one of the leaders of the Sandinista revolution that toppled a right-wing dictatorship in 1979, and he then led the country against a U.S.-backed Contra rebellion throughout the 1980s.

But when he was voted out in 1990, Ortega agreed to stand aside. He then spent 16 years in opposition before rebounding to win the 2006 election.

The democratic institutions overseen by the Sandinistas and a series of conservative governments have proven to be relatively robust, so there was concern when the Supreme Court which Ortega's party controls overturned a ban on consecutive presidential terms in 2009.

The 65-year-old Ortega dismissed claims the decision was meant to help him stay in office indefinitely.

Instead, he points to his record on battling poverty in Nicaragua, which since 2005 has fallen by 8.5 percentage points to 57 percent, World Bank data shows.

He is also a major shareholder in several large businesses, which seems to reassure the big business community that he is no socialist threat, said John Booth, a political scientist at the University of North Texas.

Perez, 60, is more of an unknown quantity, having never held the top job in Guatemala, where nearly a quarter of a million people died or were disappeared during the civil war.

A United Nations-backed Truth Commission found that the vast majority of rights abuses were committed by the military.

Supporters say Perez was a progressive officer during his service, although human rights groups have alleged that troops under his command carried out abuses during the conflict.

Perez has never been charged and rejects the allegations.

A key measure of his presidency will be whether he allows Attorney General Claudia Paz y Paz to press ahead with her drive to investigate war-time atrocities committed by senior military officers.

(Writing by Dave Graham; Editing by Kieran Murray)