A retired right-wing general promising a crackdown on violent crime won Guatemala's presidential election on Sunday and will be the first military man to take power since democracy was restored in 1986.
Otto Perez had 54.2 percent support with results in from 98 percent of polling stations while his rival, wealthy businessman Manuel Baldizon, trailed with 45.8 percent.
Guatemala's electoral tribunal declared Perez the winner late on Sunday, and his supporters began celebrating in the streets.
It was a clear move to the right for Central America's largest economy and came after leftist President Alvaro Colom failed to contain violent crime or protect the country from Mexican drug cartels using it as a key smuggling route.
Perez, 60, won the run-off election by promising a firm hand against crime. He has vowed by deploying troops on the streets and increasing the size of the police force.
From the first day on, Guatemalans are going to see they've got a president committed to defending the lives and safety of all Guatemalans, Perez said late on Sunday, vowing to devote at least 60 percent of his time on security.
Supporters set off fireworks and joined a street party near the convention centre where the votes were counted. They sported the Patriot Party's orange colours on shirts and caps and waved their fists in the air in imitation of Perez's clenched-hand campaign emblem.
Guatemala's murder rate is about eight times that of the United States and many of the country's 14.7 million people want a tougher stance on crime.
There's even extortion in the schools, said housewife Elsa Guzman, 59. I trust the army more. The army is not afraid to go out at night, but the police don't even go out at night ... that's why we want a military man.
Human rights groups fear Perez's crime-fighting message may have a dark side in a country with a history of military dictatorships and extra-judicial killings by security forces.
The army murdered suspected leftists and committed many massacres of peasants during the 1960-1996 civil war, in which about a quarter million people were killed or disappeared.
Perez was a commander in some of the most violent areas and there have been allegations that troops under his command committed abuses. He also headed the military intelligence unit accused of engineering assassinations of political rivals.
But he was also seen as a progressive officer inside the army and had a key role in supporting the 1996 peace accords which ended the war.
Perez has never been charged with human rights crimes and brushes off the accusations against him. I can tell you, it's totally false, he told Reuters on Saturday.
The election campaign focussed mainly on Guatemala's battle against street gangs and Mexican drug traffickers moving South American cocaine up through the country to the United States. Military experts say cartels and gangs control around 40 percent of Guatemala, a huge challenge for the next president.
Perez wants to hire 10,000 new police and 2,500 more soldiers to tackle crime, a model similar to that used in Mexico to combat the cartels.
But the policy has different implications in Guatemala, where a United Nations-backed Truth Commission found that 93 percent of civil war atrocities were committed by the state.
The war was tough. They raped girls, killed children. They evicted people and took their possessions, said photographer Alvaro Hernandez, 46. I'm not for the military.
Even since the war ended, police have been suspected of executing young street gang members.
Guatemala has begun to prosecute military officers implicated in the worse civil war abuses although Perez's victory will fan fears that they may escape justice.
Analysts say a key test will be whether Perez retains crusading Attorney General Claudia Paz y Paz, who has pushed ahead with human rights trials.
That's the big question. If she's able to keep her job, will they allow her to do her job? said Adriana Beltran at the Washington Office on Latin America think tank in Washington.
Perez has said that if Paz y Paz is doing her work well, there is no reason to end her four-year term prematurely.
The new president, who takes office in January, must also address severe poverty affecting more than half the population of the coffee- and sugar-exporting nation, which has one of the world's highest rates of chronic child malnutrition.
However, it is unclear where funds for extra spending on social assistance of security would come from.
Guatemala has one of the lowest tax takes in Latin America, at around 11 percent of gross domestic product, and a fiscal deficit above 3 percent of GDP.
Perez says he will boost tax collection to 14 percent of GDP in the next four years by targeting tax evasion. He has ruled out creating new taxes.