Get breaking news alerts and special reports. The news and stories that matter, delivered weekday mornings.

QUITO, Ecuador — Leftist candidate Lenin Moreno won Ecuador's presidential runoff Sunday, according to the country's electoral council, reversing a recent rightward trend in Latin American politics and continuing President Rafael Correa's "Citizens' Revolution."

Lenin Moreno with supporters during a campaign rally along the streets in Babahoyo, Ecuador, in February. Henry Romero / Reuters

But opposition candidate Guillermo Lasso, a conservative former banker who had already claimed victory based on three exit polls — and who had promised to evict WikiLeaks founder Julian Assange from the Ecuadorian embassy in London within 30 days — immediately demanded a recount.

"We will know how to defend the people's will," Lasso said.

The head of the National Electoral Council, Juan Pablo Pozo, called on the candidates to recognize the results.

I cordially invite Lasso to leave Ecuador within 30 days (with or without his tax haven millions) https://t.co/8tORJgltQl #AssangeSILassoNO pic.twitter.com/Pbf5Bf3UrL — Julian Assange (@JulianAssange) April 3, 2017

Let our news meet your inbox. The news and stories that matters, delivered weekday mornings. This site is protected by recaptcha

"Ecuador deserves the ethical responsibility from its political actors to recognize the democratic decision made by the people at the ballot box," he said.

A separate "quick count" conducted by a respected local group found a technical tie between the two candidates, with a difference of less than 0.6 percentage points. The group refrained from saying which candidate was leading until the electoral authorities made their pronouncement.

Earlier Sunday, a jubilant Lasso told supporters in Guayaquil that he would free political prisoners and heal divisions created by 10 years of iron-fisted rule by Correa.

"Today, a new Ecuador has been born," Lasso said to loud shouts of "freedom" and "get out thieves."

"Behind us are those dark pages of hatred among Ecuadoreans," he said.

But Moreno urged supporters to wait for official results that he said would confirm his "triumph."

Supporters of Lasso amassed outside the National Electoral Council to guard against what they fear could be attempts to steal an eventual victory. Moreno supporters gathered at another point just beyond the four-block security perimeter.

The president cast his vote shortly after polls opened early Sunday, saying the contest would be "very important" for determining whether the small Andean nation of 16 million takes a turn for the right or whether "progressive tendencies resume their force."

While Lasso has said he would evict Assange from the embassy where Ecuador granted him asylum in 2012 to prevent his extradition to Sweden, Moreno has said he could stay, increasing international interest in Sunday's vote.

The head of the National Electoral Council called on the candidates to recognize the results.

"Ecuador deserves the ethical responsibility from its political actors to recognize the democratic decision made by the people at the ballot box," said council president Juan Pablo Pozo.

But Lasso, who earlier had claimed victory based on three exit polls showing him winning by as many as 6 points, said he would seek a recount.

"Let's not be provoked. We will act democratically and with respect for authorities but firmly to defend the people's will," Lasso said in a message posted on Twitter. "We're not fools, nor are the Ecuadorean people."