With just 0.1% of voting machines counted, Lula had 51% of valid votes, compared to 37% for Bolsonaro, the Superior Electoral Court (TSE) reported on its website. If no candidate wins over half the votes, excluding blank and spoiled ballots, the top two will face off in a second-round vote on Oct. 30.

(Reporting by Victor Borges; Additional reporting by Eduardo Simoes and Steven Grattan in Sao Paulo; Editing by Brad Haynes)