Brazil's leftist president led his main challenger in his bid for re-election, but was falling just shy of the majority of votes needed to avoid a runoff, results showed.
With 72 per cent of the ballots counted, President Luiz Inacio Lula da Silva had 49 per cent of the vote compared to 41 per cent for the center-right Sao Paulo state Gov Geraldo Alckmin, election officials said. Far-left Sen Heloisa Helena had 7 per cent, while lesser-known candidates split the rest.
Silva, who brought economic stability to Brazil and dramatically boosted anti-poverty but was dogged by corruption allegations, needs 50 per cent plus one vote to win the contest. If he fails to get that, he and Alckmin head to a runoff on October 29.
Earlier on Sunday, Silva sounded confidence after voting in the industrial town of Sao Bernardo Do Campo where he rose to prominence as a labour leader.
"I am sure we will win the election today, in the first round," he said.
For months, polls have shown Silva easily winning a first-round victory. But Silva saw his once-commanding lead plummet on the eve of the vote, as his Workers' Party was battered by allegations that party officials tried to buy a mysterious dossier that apparently contained incriminating information about a political rival.
Major newspapers ran front-page photos over the weekend showing piles of money allegedly meant to buy information showing corrupt dealings by an opponent.