With over 97% of the votes counted in the Sunday election, Bolsonaro has 43.63%, while Lula has 47.93%.
"Elections are mathematically decided (second round)," the TSE said on its website, where it updates the vote count.
A general election was held in Brazil on Sunday. It was necessary to gain over 50% of the votes in the first round in order for a candidate to win. The runoff will be held on October 30.