(Adds details on OAS)
By Alexandra Ulmer and Alexandra Valencia
QUITO, April 3 (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 decade-long 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. "This is a clumsy fraud attempt."
Lasso tweeted photos showing what he said were original votes for him that were changed by electoral officials and on Monday presented his complaint to the Organization of American States, which has an observation mission in Ecuador.
But the OAS later said in a statement it had seen "no discrepancies" between results collected by its observers at polling stations and official results. And the election authority denied fraud allegations.
Ruling Country Alliance party officials scoffed that Lasso was a sore loser who was inciting violence.
But Lasso persevered on Monday, holding a rally under the pouring rain in his coastal hometown of Guayaquil and vowing to keep battling what he said was fraud.
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!"
Protests did not appear to be escalating. But Moreno 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. He put rights for disabled Ecuadoreans at the heart of his campaign.
The 64-year-old 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 had 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, Jonathan Oatis and Mary Milliken