Leftist government candidate Lenin Moreno has claimed victory in Ecuador's presidential vote, but the conservative challenger has asked for a recount as some supporters took to the streets in protest.
A Moreno win would come as a relief for WikiLeaks founder Julian Assange after conservative candidate Guillermo Lasso vowed to remove Assange from the Ecuadorian embassy in London if he won the runoff.
It would also boost 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 de facto leftist leader, President Nicolas Maduro of crisis-hit Venezuela, profusely congratulated Moreno on Twitter, as did Bolivia's President Evo Morales.
Lasso, a former banker, had promised to denounce the embattled Maduro, who foes say has lurched his country towards dictatorship.
Moreno, a paraplegic former vice-president, had secured 51.1 per cent of the votes compared with Lasso's 48.9 per cent, with more than 96 per cent of votes counted, according to the electoral council on Sunday. It has not yet declared a winner.
A sombre Lasso, who had earlier proclaimed himself victorious based on a top pollster's exit poll, disputed the results that would extend a decade-long leftist rule in oil-rich Ecuador.
"They've crossed a line," he told supporters gathered in a hotel in his coastal hometown of Guayaquil.
Lasso asked for a recount and vowed to challenge the results, a complex process that could take time.
Lasso contrasted Sunday's fast results with the first round of the election in February, when a final tally took days to come out and his supporters gathered in front of the electoral council to guard against what they said were fraud attempts.
Hundreds of Lasso supporters again swarmed in front of electoral council offices in the capital, Quito, and Guayaquil, waving yellow, blue and red Ecuadorian flags and chanting "No to fraud!" and "We don't want to be Venezuela!"
There were reports of isolated clashes, but protests lost intensity as the night went on and people went home.
Moreno, who lost the use of his legs two decades ago when he was shot during a robbery, would become one of few presidents in the world to use a wheelchair if he takes office on May 24.
"Lenin", as he is commonly referred to by his supporters, celebrated in mountainous Quito on Sunday night
"We're going to keep building the path, we've done a lot but there's a lot more to do!" he said, flanked by running mate and current vice-president, Jorge Glas, as well as outgoing President Rafael Correa.
Moreno, a former UN envoy on disability, has a more conciliatory style than the fiery Correa and has promised benefits for single mothers, the elderly, and disabled Ecuadorians.
He would face strong pressure to create jobs amid an economic downturn and to crack down on graft amid corruption scandals at state-run oil company PetroEcuador and Brazilian conglomerate Odebrecht.
Lasso has criticised Moreno as economically ill-equipped and has warned his major social promises would hit already pressured coffers in a country dependent on exports of oil, bananas, and shrimp.
Moreno's supporters, in turn, have decried Lasso's plans, warning that he would slash welfare benefits and govern for the rich.