(CNN) Ecuador's presidential election balanced on a razor-thin margin late Sunday as the two runoff candidates were polling within 3 percentage points with over 96% of the votes counted.

As counting neared completion in Quito and around the country, leftist candidate Lenin Moreno of the ruling Alianza PAIS (Country Alliance) party held a narrow lead over conservative opponent Guillermo Lasso.

Preliminary figures released by the country's National Electoral Council (CNE) had Moreno with 51.1% for the votes cast, and Lasso at 48.9%, with 96.22% of the votes counted.

Around 8.30 p.m. local time (7.30 p.m. ET) Moreno declared himself the winner, but shortly that after a nongovernmental organization that had been monitoring the result said that it was a virtual tie.

Supporters of Lenin Moreno celebrate after he claims victory in Quito on April 2.

While no official announcement has yet been made by the CNE, the body said that Moreno was ahead by 2 percentage points and the trend was irreversible.

Hundreds of demonstrators gathered outside the National Election Council offices in Quito and Guayaquil to protest the election outcome, pictures from the scenes showed.

Supporters of presidential candidate Guillermo Lasso protest near the National Electoral Council in Quito, Ecuador, Sunday, April 2, 2017.

Disputed results

Lasso, a former banker, said that he was requesting a recount. "Delegates from our political alliance will challenge the results," Lasso said. "We will not allow a distortion of the popular will."

A recount could take weeks to implement.

Moreno, who is confined to a wheelchair, challenged the allegation that there was fraud. "We have completely accurate data," he said. "We have won the elections."

Moreno, who is universally referred to by his first name, Lenin, by supporters, tweeted a photo of his victory speech with the message: "Long live Ecuador! Welcome fighters of peace and of life."

¡Viva el Ecuador! ¡Bienvenidos luchadores de la paz y de la vida! pic.twitter.com/8gG5COUa1V — Lenín Moreno (@Lenin) April 3, 2017

"Official results from the National Electoral Council, a difference of more than two percentage points. Lenin is our president," President Correa said. "The moral fraud committed by the right will not go unpunished."

Moreno, himself a former vice president, told supporters that he will work "for those who voted for me and for those who did not," according to the government-run El Telegrafo newspaper.

His opponent called on supporters to take to the streets to peacefully protest the result.

Supporters of Guillermo Lasso react as they watch the National Election Council's partial official results on April 2.

"Let's act in a peaceful but firm manner," Lasso's tweet read. "We must go to the streets and say 'don't steal my vote' because we want a change in Ecuador."

Actuemos de manera pacífica pero firme. Hay que ir a las calles a decir: NO ME ROBES MI VOTO porque queremos un CAMBIO en el Ecuador. — Guillermo Lasso (@LassoGuillermo) April 3, 2017

Voters in Latin America have been swinging rightwards, with recent wins in Brazil and Argentina for conservative candidates challenging leftist governments in the region. Given Ecuador's potential recount, it is too early to tell whether Moreno's apparent win will buck this trend.

Relief for Assange?

The apparent result will come as a relief for Wikileaks founder Julian Assange, who has been holed up in the Ecuadorean embassy in London for almost five years to avoid facing sexual assault charges in Sweden.

As a campaign promise, Lasso had vowed to have Assange removed from his quarters in London within 30 days of taking office. Moreno had indicated that his government would continue to shelter Assange from prosecution.

If apprehended by the Swedes, Assange has said he could eventually end up in the United States , where he could be charged and tried over the leak of confidential US documents to the public via WikiLeaks.

Assange struck back at Lasso's pledge to remove him with a tongue-in-cheek tweet, "cordially inviting" Lasso to leave Ecuador.

"I cordially invite Lasso to leave Ecuador within 30 days (with or without his tax haven millions)," the tweet read, echoing Lasso's language in his pledge to remove Assange from the London embassy.