By Alexandra Ulmer and Alexandra Valencia
QUITO (Reuters) - Socialist candidate Lenin Moreno on Monday celebrated victory in Ecuador's presidential election, bucking a shift to the right in South America, but his conservative challenger demanded a recount amid scattered protests.
Moreno's triumph was a relief for WikiLeaks founder Julian Assange after former banker Guillermo Lasso had vowed to remove him from Ecuador's embassy in London if he won the runoff.
It was also a boost for the struggling leftist movement in South America after right-leaning governments recently came to power in Argentina, Brazil, and Peru as a commodities boom ended, economies flagged and corruption scandals grew.
The region's high-profile Socialist leader, President Nicolas Maduro of crisis-hit Venezuela, congratulated Moreno profusely on Twitter, as did Bolivian President Evo Morales.
"Congratulations Ecuador, the citizen's revolution has triumphed!" said Maduro, who was echoed by much of his Cabinet.
"21st century Socialism always triumphs," tweeted Morales. "Congratulations brother @Lenin!"
Lasso had promised to denounce the embattled Maduro, who foes say has turned his country into a dictatorship.
Moreno, a paraplegic former vice president, secured 51.17 percent of the votes, compared with Lasso's 48.83 percent, with over 99 percent of votes counted, the electoral council tally showed on Monday afternoon.
Lasso, who had proclaimed himself victorious based on a top pollster's exit poll, disputed the close results that would extend a decadelong leftist rule in oil-rich Ecuador.
"I'm warning the world that in Ecuador procedures are being violated, and they're trying to swear in an illegitimate government on May 24," he said on Monday afternoon, again vowing to challenge the results. "This is a clumsy fraud attempt."
Lasso tweeted photos showing what he said were original votes for him that were changed by electoral officials.
Later on Monday, he presented his complaint to the Organization of American States, which has an observation mission in Ecuador.
The election authority denied fraud allegations. Still, Lasso's challenge meant Moreno's official proclamation as president will be delayed.
Lasso contrasted Sunday's quickly tallied vote with the first round in February, when the results took days to come out.
Hundreds of his supporters had swarmed in front of electoral council offices in the capital, Quito, and in Guayaquil, on Sunday waving yellow, blue and red Ecuadorean flags and chanting "No to fraud!" and "We don't want to be Venezuela!"
There were reports of isolated clashes on Sunday night, but Ecuador was quiet on Monday even though many Lasso supporters remained angry.
"This is shameless fraud, we all know it," said taxi driver Roberto Vera, 50. "They're from the Venezuelan school, that's their governance model and it will do great harm to all Ecuadoreans."
But ruling Country Alliance officials scoffed that Lasso was a sore loser and inciting violence.
Going forward, while Moreno's party has control of Congress, he will need to cultivate support from many in the polarized country who view his narrow win with suspicion.
Moreno, who lost the use of his legs two decades ago when he was shot during a robbery, will become a rare head of state to use a wheelchair when he takes office next month.
Moreno, who put rights for disabled Ecuadoreans at the heart of his campaign, celebrated in mountainous Quito overnight with the flag-waving crowd chanting, "Lenin President!"
"A big hug to those who believed in our proposal as well as to those who did not vote for us; we'll work for them too," Moreno tweeted on Monday, when he participated in the changing of the guard at the presidential palace in Quito with outgoing President Rafael Correa.
Moreno, a former United Nations special envoy on disability and accessibility, has a more conciliatory style than the fiery Correa and has promised to reach out to opponents and business sectors.
He will be under pressure to create jobs and crack down on graft amid corruption scandals at state-run oil company PetroEcuador and Brazilian conglomerate Odebrecht.
Lasso has criticized Moreno as being ill-equipped to deal with economic issues and warned that his major social promises would hit already pressured coffers in a country dependent on exports of oil, bananas and shrimp.
"Moreno's margin of victory was much smaller than those of his predecessor, Rafael Correa, leaving him in a much weaker spot," said John Polga-Hecimovich, a political scientist at the U.S. Naval Academy.
"He has the advantage of a legislative majority (for now), but his government will have to confront fiscal restraints, a stagnant economy, and the burden of a recovery from last April's earthquake."
(Additional reporting by Yury Garcia, Daniel Tapia, and Henry Romero in Guayaquil and Jose Llangari and Mariana Bazo in Quito; Writing by Alexandra Ulmer; Editing by Andrew Cawthorne, Jeffrey Benkoe and Jonathan Oatis)