Ecuadoran officials denied claims of attempted fraud in a tightly-fought election as the last votes were counted Tuesday with the ruling socialists looking likely to face a hard-to-win runoff vote.

With just over 95 percent of ballots counted from Sunday's election, leftist ruling party candidate Lenin Moreno had 39.21 percent of the vote, according to the National Electoral Council.

That was just short of the 40 percent needed to avoid a runoff on April 2 against his conservative rival Guillermo Lasso, who was on 28.35 percent.

"There is a marked trend, and if that turns out to be the case there would be a runoff," the president of the National Electoral Council, Juan Pablo Pozo, told a news conference.

He has said it could take until Thursday for the full results to be confirmed.

Lasso said he was confident there would be a second-round runoff.

"That it should take three days to publish final results is an attempt at fraud and we are not going to allow that," he wrote on Twitter.

The electoral council has denied any fraud took place. It insisted in a statement that it would "guarantee that the people's will is respected."

"Never in the history of the country have results come out less than 48 hours after the end of voting," it said on Twitter.

- Impatience -

Supporters of Lasso earlier scuffled with police as they gathered outside the electoral council, impatient at the delay.

Lasso called on people "not to give in to provocation."

Political analyst Santiago Basabe of the social science institute FLACSO said it was "difficult for the current trend (towards a runoff vote) to be reversed."

A member of the National Electoral Council counts votes in Quito on February 21, 2017 RODRIGO BUENDIA, AFP

Opinion polls indicate Moreno may well lose a runoff in which supporters of other conservative opposition groups are likely to rally behind Lasso.

Sunday's election was a test of the legacy of outgoing President Rafael Correa, Moreno's more hardline ally, who is an outspoken critic of the United States.

Correa is leaving office at the end of his term after 10 years in power.

Ecuadorans voted on whether to continue Correa's tax-and-spend policies or give Lasso a mandate to cut spending and taxes.

If ex-banker Lasso wins the presidency, another pillar of the Latin American left will swing to the right after Argentina, Brazil and Peru did so in recent months.

Lasso has also said he will consider ending WikiLeaks founder Julian Assange's asylum in Ecuador's London embassy.