Brazil's incumbent President Lula has edged past his rival Senator Bolsonaro to win an unprecedented fourth term, according to Brazil's official election body. Lula received 51.75% of votes with 98.76% of votes counted. The result followed a Supreme Court extension for nearly 160 million Brazilians, sparking tension in the country.

Legal challenges are likely, as the voting extension adds tension to Brazil's polarised political landscape.

* Brazil's incumbent President Lula has edged past his rival Senator Bolsonaro to win an unprecedented fourth term, according to Brazil's official election body. Lula received 51.75% of votes with 98.76% of votes counted, while his challenger Senator Bolsonaro trailed slightly with 48.25%.

* After a Supreme Court extension, votes for nearly 160 million Brazilians are almost finished being counted.

* Brazil's incumbent President Lula has edged past his rival Senator Bolsonaro to win an unprecedented fourth term, according to Brazil's official election body. Lula received 51.75% of votes with 98.76% of votes counted, while his challenger Senator Bolsonaro trailed slightly with 48.25%.

* After a Supreme Court extension, votes for nearly 160 million Brazilians are almost finished being counted.

* Supreme Court Justice Cristiano Zanin gave a last-minute order that ⁠⁠voting in Sunday's presidential ⁠⁠run-off be extended by two hours, granting a request from President Luiz Inacio Lula da Silva's campaign.

* Lula asked to extend voting hours, citing the unavailability of public transport in some areas. Flávio Bolsonaro's campaign also requested an extension, citing heavy rains that shut polling stations in some areas.

* The changes are likely to spark legal challenges, further polarising the country's fractious political scene.

Brazil's incumbent President Lula has edged past his rival Senator Bolsonaro to win an unprecedented fourth term, according to Brazil's official election body.

Lula received 51.75% of votes with 98.76% of votes counted, while his challenger Senator Bolsonaro trailed slightly with 48.25%.

Brazil's constitution allows presidents to serve two consecutive four-year terms, but there's no limit on how many times they can return after sitting out a term.

Lula first ran in 1989, losing three elections before winning in 2002. He was re-elected in 2006 and returned to power in 2022.

Today marks his seventh presidential election.

Prominent Brazilian polling firm Datafolha has projected Lula will win the presidential runoff race, as the official electoral commission showed the incumbent with 51.31% of the vote with 80.75% of the vote counted.

Brazil's presidential run-off is a neck-and-neck race, with the lead flipping between Bolsonaro and Lula as just over half of the votes have been counted.

With much of the vote still uncounted, including ballots from the northeast, where Lula has his strongest support, Al Jazeera's Latin America editor Lucia Newman says, "it is much too early". Both camps are "extremely nervous", she adds.

Newman also warns that confusion over a last-minute, nationwide extension of voting by two hours could have consequences if the race remains tight, amid uncertainty over whether all polling stations stayed open for the additional two hours.

Lula and Bolsonaro were almost tied with just over half of votes counted, according to a live tally by Brazil's official electoral body.

The incumbent President Lula held 50.16 percent with 51.94 percent of votes counted, while his challenger, Senator Bolsonaro, trailed slightly with 48.84 percent.

With just over a third of Brazil's votes counted and Bolsonaro holding a tiny lead, a prominent pollster has predicted Lula will win.

Citing the ongoing vote count in the presidential run-off, CEO of pollster AtlasIntel Andrei Roman made the remarks to Reuters.

Campaign coordinators for Brazil's two presidential candidates have traded accusations of election interference amid controversy over a Supreme Court decision to extend voting by two hours.

Edinho Silva, Lula's campaign coordinator, accused local officials of breaking the law by suspending free public transport, potentially preventing voters from reaching polling stations.

"Suspending free transportation goes against the law and means direct interference in the electoral process," he wrote on social media.

Meanwhile, Rogerio Marinho, Bolsonaro's campaign coordinator, criticised the Supreme Court justices.

"It's astonishing how much some Supreme Federal Court justices are intervening," he wrote. "I sincerely hope common sense prevails and that no judicial coup or procedural trickery succeeds, for the sake of democracy."

* Polls closed at 7pm local time (22:00 GMT) across the country, and the Superior Electoral Court is counting ballots.

* Brazil's Supreme Court ordered voting to be extended by two hours nationwide after reports of public transport disruptions and requests from both campaigns. The last-minute extension caused confusion at some polling stations that had already closed, and will likely spark legal challenges.

* Federal Police are investigating suspected crimes linked to public transport in five states: Bahia, Sao Paulo, Piaui, Sergipe and Alagoas.

* Lula has a tiny lead over Bolsonaro with just over 10 percent of votes counted. Results are expected to be called in the coming hours as Brazil used an electronic ballot system.

Some Brazilian voters were turned away from polling stations despite a Supreme Court order extending voting by two hours.

Al Jazeera's Monica Yanakiev reported from a polling station where five voters waited to cast their ballots, only to be told the electronic voting machines had already been closed and could not be reopened.

"The woman here who was in charge of this polling station explained that the reason that there was so much confusion is because there was conflicting opinions by two tribunals," Yanakiev said.

The Electoral Tribunal had ordered polls closed, while the Supreme Court subsequently ruled that voting should continue.

"With two tribunals, each one saying something different, nobody really knew what to do," she added.

Lula's supporters still think there is a chance, although he has been trailing behind the polls. It's a very slight difference.

This is the tightest election since 1989. This is such a tight election that people here have been discussing what would happen if they both have the exact number of votes.

And in this case, Brazil's legislation foresees that the eldest candidate would be elected president.

Brazil's Federal Police are investigating possible crimes linked to public transport disruptions during Sunday's presidential run-off, a senior official said, after the outages helped lead to an unprecedented Supreme Court decision to extend voting by two hours.

The probe covers five states: Bahia, Sao Paulo, Piaui, Sergipe and Alagoas, Brazil's Federal Police director of investigations Dennis Cali said. A formal inquiry has only been opened in Sergipe so far, he added, with investigators interviewing people involved in providing transport.

If Lula wins the presidency after finishing second in the first round, he will have pulled off something no presidential candidate has since Brazil's return to democracy.

No candidate who finished second in the first round has gone on to win the run-off, but with polls showing the two virtually tied, Lula is hoping to break that streak.

Lula secured 45 percent of the vote on October 4, trailing Bolsonaro, who won 47 percent.

Vote counting for Brazil's presidential run-off is under way after a Supreme Court extension expired.

Lula has 52.27 percent of the vote with 1.5 percent of ballots counted so far, according to the country's official electoral body, while Bolsonaro has 47.73 percent.

Polls are due to have officially closed across Brazil in the presidential run-off between Luiz Inacio Lula da Silva and Flavio Bolsonaro after voting was extended by two hours nationwide, a shock move by the country's Supreme Court.

Confusion is growing over the decision to extend voting by two hours in Brazil's presidential run-off, after some polling stations had already closed and started transmitting their results.

Reporting from Brasilia, Al Jazeera's Lucia Newman said the decision came just three minutes after polls were scheduled to close at 5pm local time.

Both candidates had called for an extension in parts of the country, citing heavy rain and transport disruptions that prevented some voters from reaching polling stations.

But Brazil's electronic voting system means that once a machine has been closed and its results transmitted, it cannot simply be reopened.

"So now we're in limbo," said Newman. "We're not sure if some of the voting places will be able to stay open a bit longer or whether they'll have to backtrack and say, 'So sorry, but what happened up until 5pm exactly are the only results that are going to be considered legitimate.'"

Brazil's 2022 presidential election was one of the closest in the country's history. Lula defeated incumbent Jair Bolsonaro in the October 30 runoff, winning 50.9 percent of the vote to Bolsonaro's 49.1 percent, which was a margin of about 2.1 million votes.

Bolsonaro performed better than expected in the first round, narrowing the gap with Lula, who had led in the polls. During the run-off count, Bolsonaro initially led before Lula overtook him as more votes were tallied. Bolsonaro did not immediately concede defeat.

Mario Sergio Lima, Brazil analyst at Medley Advisors, expressed concern that the two-hour voting extension across Brazil could open the final result to litigation.

"I don't see any problem with the extension itself, as both campaigns requested it, but the way it was done, after polling places had closed, makes things more complicated," he told Al Jazeera.

The decision was issued by Supreme Court Justice Cristiano Zanin, not the electoral court itself, minutes after the closure of polls at 5pm local time.

Reopening some closed polling stations with Brazil's 100-percent electronic voting system is not straightforward, he added, and the electoral court has yet to issue a statement on the extension.

Heavy rain has left 163 polling locations without power in Brazil's Minas Gerais state, according to local media reports citing the Regional Electoral Court (TRE-MG). Senator Flavio Bolsonaro's campaign had cited the closures in its request to extend voting.

The storm brought winds of up to 150km/h (93mph) in the south of the state and nearly 90km/h (56mph) in the capital, Belo Horizonte, damaging power lines and leaving thousands without electricity.

Electricity provider Cemig said about 110,000 customers remained without power in Belo Horizonte.

Both Lula's and Bolsonaro's campaigns requested an extension of voting hours. Lula's cited public transport disruptions and accused local officials of interfering with voters' access to polling stations. Bolsonaro's campaign pointed to heavy rain and flooding that has left hundreds of polling locations without power.

"Nobody can give up voting because some unscrupulous businessman or a dishonest, criminal mayor tried to stop them," Lula said.

"After the elections, the next step is to seek the arrest of these mayors for electoral crimes," he added.

Supreme Court Justice Cristiano Zanin extended voting nationwide by two hours, until 7pm local time (22:00GMT).