Brazilian Senator Flavio Bolsonaro will face President Luiz Inacio Lula da Silva in the 25 October presidential run-off, the country's electoral authority said on Sunday.
With just over 97% of the ballots counted, the right-wing challenger took 47.45% of valid votes in the first round, beating the forecasts in most private surveys, while leftist Mr Lula was behind at 44.66% of the votes.
A second round between the top two candidates will now be held after none of the 12 candidates gained a majority of first round votes.
Nearly 159 million Brazilians were eligible to vote in Latin America's largest economy, in a campaign focused on concerns about the growing cost of living, corruption and insecurity.
Mr Bolsonaro is an ally of Donald Trump and the son of ex-leader Jair Bolsonaro, who is serving a 27-year prison sentence for masterminding a failed coup attempt after losing to Mr Lula four years ago.
Despite growing worries over Brazil's public finances and sluggish economic growth, the campaign offered little policy debate, as both leading candidates skipped the major TV debates.
Reacting to the results, the 80-year-old incumbent, who is seeking his fourth non-consecutive term, called it an "unexpected result" and said a new campaign would begin tomorrow.
While the 45-year-old challenger said the result showed Brazilians want change.
Another right-wing win in Latin America
Private surveys in the run-up to the election had forecast Mr Lula leading the first-round vote by around 3%.
The fact that Mr Bolsonaro came in ahead of his rival extends a wave of wins across Latin America by right-wing candidates aligned with the US president - although the results of the run-off will be the real test.
His Liberal Party also performed well in the National Congress, where all 513 lower house members and two-thirds of the Senate seats were up for election.
Election authorities confirmed that Michelle Bolsonaro, the wife of the former president and Flavio Bolsonaro's stepmother, has also won a Senate seat in the Federal District.
Congress has gained greater influence in Brazilian politics since the impeachment of former President Dilma Rousseff, an ally of Mr Lula, in 2016.
A scandal-plagued campaign
Scandals and fears of foreign interference ahead of the vote largely overshadowed policy debates during the campaign.
Controversy surrounding the now-defunct Banco Master has engulfed much of Brazil's political class after Daniel Vorcaro, who ran the bank, was arrested earlier this year and accused of a multibillion-dollar fraud scheme.
The investigation has probed the banker's ties to figures from Supreme Court Justice Alexandre de Moraes to the younger Bolsonaro, who is being investigated for money laundering tied to the case by the federal police.
Both have dismissed the allegations against them.
More from Sky News:
US removes all Air Force bombers from RAF Fairford
Bowel cancer study: Experts searching for 250,000 people
Throughout the campaign, Mr Lula's allies have warned that the Trump administration might refuse to recognise election results if he wins, pointing to a ditched effort to send US officials to Brazil.
Mr Trump has not formally endorsed a candidate, though he hosted Senator Bolsonaro at the White House and praised him publicly.
On Sunday afternoon, Brazil's electoral court chief Kassio Nunes Marques said the election, which is run using electronic voting, was running smoothly.
(c) Sky News 2026: Bolsonaro and Lula to compete in Brazilian presidential run-off after tight vote

US removes all Air Force bombers from RAF Fairford after suspected terror plot
Woman at centre of Cornell rape allegations has been threatened, lawyer says
Christa Pike's lawyer gives update on death row inmate
Israeli journalists banned from media call after Republic of Ireland match
Two dead, dozens injured in US street party shooting in Georgia




