Far-right incumbent Jair Bolsonaro is slightly leading former Luiz Inacio Lula da Silva in Brazil’s presidential election, with 52% of the votes counted.
Mr Bolsonaro has 46.3% support compared with 44.9% for Mr da Silva of the leftist Workers’ Party.
Six other candidates share the remaining votes in Sunday’s election.
It is not yet clear if either of the two candidates will be able to claim an outright victory. A possible runoff is scheduled for October 30.
Polls closed at 5pm nationwide and because the vote is conducted electronically, initial results are out quickly. Final results are usually available a few hours later.
The highly polarised election will determine whether the country returns a leftist to the helm of the world’s fourth-largest democracy or keeps the far-right leader in office for another four years.
Mr Bolsonaro’s administration has been marked by incendiary speech, his testing of democratic institutions, his widely criticised handling of the Covid-19 pandemic and the worst deforestation in the Amazon rainforest in 15 years.
But he has built a devoted base by defending conservative values and presenting himself as protecting the nation from leftist policies that he says infringe on personal liberties and produce economic turmoil.
Mr da Silva is credited with building an extensive social welfare programme during his 2003-10 presidency that helped lift tens of millions into the middle class.
He is also remembered for his administration’s involvement in vast corruption scandals and his own convictions, which were later annulled by the Supreme Court.
More than 150 million Brazilians were eligible to vote, though abstention rates can reach as high as 20%.