Alvaro Noboa, a billionaire banana magnate, had won 26.7 per cent of the votes counted from Sunday's vote and will likely face Rafael Correa, a left-wing former economy minister who won 22.5 per cent, in a second round vote on November 26.
However, counting had to be suspended on Sunday with only 70 per cent of the ballots counted, after a vote-counting system that cost $5m broke down.
On Monday, election officials sacked E-Vote, the Brazilian company responsible for the system.
Correa had been leading in the early count before the computers crashed. Once counting resumed, Correa found himself behind and cried foul.
"We won," he said, accusing his rival and election authorities of fraud. "The people are being cheated".
Hundreds of protesters gathered and chanted outside the election tribunal's offices, some demanding a new election.
Meanwhile, the conservative Noboa said Correa's ties with Hugo Chavez, the Venezuelan president, and Cuba would lead to his defeat.
"The people have just given the biggest lashing you can give to a friend of terrorism, a friend of Chavez, a friend of Cuba," Noboa said.
A candidate must earn 40 per cent of the ballots with a 10-point lead over the runner-up to win the contest in the first round.
However, Santiago Nieto, a local political analyst, said Noboa may have pulled ahead by launching specific proposals.
"While Correa was making confrontational statements, Noboa, who is the richest man in Ecuador, was able to come up with specific ideas about creating jobs and solving problems in education and housing," Nieto said.
Rafael Bielsa, head of an Organisation of American States observer team, said Sunday he had seen "no irregularity" in the polling.