Right-wing opposition candidate Guillermo Lasso alleged fraud in Ecuador's presidential runoff election and said he would contest the result after a partial count showed him losing.
Leftist government candidate Lenin Moreno had claimed victory in Sunday's vote, bucking a shift to the right across South America as Lasso's supporters took to the streets in protest.
"They've toyed with popular will, we are going to defend the will of the Ecuadoran people in the face of an attempted fraud that aims to install what would be an illegitimate government," Lasso said.
A Moreno victory would come as a relief for Wikileaks founder Julian Assange after Lasso vowed to remove him from the Ecuadorean embassy in London if he won the runoff.
Moreno, a paraplegic former vice president, had secured 51.07 percent of the votes compared with Lasso's 48.93 percent, with just over 94 percent of votes counted, according to the electoral council.
It has not yet declared a winner.
Lasso, a former banker, had promised to denounce embattled Venezuelan President Nicolas Maduro, an ally of Ecuador's current government.
A bitter Lasso disputed the results on Sunday night.
He cited the first round of the election in February, when final results took days to come out and his supporters massed in front of the electoral council to guard against what they said were fraud attempts.
Moreno won 39.36 percent of the vote in the election's first round on February 19, falling just short of the 40 percent and 10-point lead necessary to win outright.
Lasso won 28.9 percent of the first round's votes, but was expected to pick up more votes after conservative Congresswoman Cynthia Viteri, who finished third in the first round, threw her support behind him.
On Sunday, hundreds of Lasso supporters swarmed in front of the electoral council offices in the capital Quito and coastal city Guayaquil, Lasso's hometown, chanting "no to fraud" and "no to dictatorship".
Al Jazeera's Daniel Schweimler, reporting from Quito, said Moreno was already celebrating victory.
"Moreno was singing along with the outgoing Rafael Correa. He's absolutely convinced he is the president-elect," he said.
"Both sets of supporters are out on the streets and while clashes have been reported, police are keeping both sides apart. Things are tense but relatively peaceful."
Moreno, who has been in a wheelchair since losing the use of his legs two decades ago after being shot during a robbery, would become one of the world's rare presidents to use a wheelchair if he takes office on May 24.
"Lenin", as he is commonly referred to by his supporters, was already celebrating a victory that would extend a decade of leftist rule.
"From now on, let's work for the country. All of us," Moreno told flag-waving supporters in the mountainous capital Quito.
Source: Al Jazeera and news agencies