RIO DE JANEIRO -- Brazil’s top two presidential candidates will face each other in a runoff vote after neither got enough support to win outright Sunday in an election to decide if the country returns a leftist to the helm of the world’s fourth-largest democracy or keeps the far-right incumbent in office.

With 99.9 per cent of he votes tallied, former President Luiz Inácio Lula da Silva had 48.4 per cent support and President Jair Bolsonaro had 43.2 per cent. Nine other candidates were also competing, but their support pales to that for Bolsonaro and da Silva, who is commonly known as Lula.

The tightness of the result came as a surprise, since pre-election polls had given da Silva a commanding lead. The last Datafolha survey published Saturday had found a 50 per cent to 36 per cent advantage for da Silva. It interviewed 12,800 people, with a margin of error of 2 percentage points.

“This tight difference between Lula and Bolsonaro wasn’t predicted,” said Nara Pavão, who teaches political science at the Federal University of Pernambuco.

Speaking at a post-vote press conference, da Silva referred to the scheduled Oct. 30 runoff vote against Bolsonaro as “extra time” in a soccer game.

“I want to win every election in the first round. But it isn’t always possible,” he said.

Bolsonaro told reporters in capital city Brasilia that he understood there was “a desire for change” among the population, hard hit by the economic crisis and high inflation. “But certain changes can be for the worse.”

The president, who has repeatedly questioned the reliability of the country’s electronic machines, did not challenge Sunday night’s results, although he said he was waiting for more information from the Defence Ministry.

He added that his party’s good results in Congress – it won the most seats – could bring fresh support ahead of the Oct. 30 vote.

Bolsonaro outperformed expectations in Brazil’s southeast region, which includes populous Sao Paulo, Rio de Janeiro and Minas Gerais states, according to Rafael Cortez, who oversees political risk at consultancy Tendencias Consultoria.

“The polls didn’t capture that growth,” Cortez said.

Carlos Melo, a political science professor at Insper University in Sao Paulo, said: “It is too soon to go too deep, but this election shows Bolsonaro’s victory in 2018 was not a hiccup.”

Bolsonaro’s administration has been marked by incendiary speech, his testing of democratic institutions, his widely criticized 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, rebuffing political correctness and presenting himself as protecting the nation from leftist policies that he says infringe on personal liberties and produce economic turmoil.

While voting earlier Sunday, Marley Melo, a 53-year-old trader inBrasilia, sported the yellow of the Brazilian flag, which Bolsonaro and his supporters have coopted for demonstrations. Melo said he is once again voting for Bolsonaro, who met his expectations, and he doesn’t believe the surveys that show him trailing.

“Polls can be manipulated. They all belong to companies with interests,” he said.

A slow economic recovery has yet to reach the poor, with 33 million Brazilians going hungry despite higher welfare payments. Like several of its Latin American neighbours coping with high inflation and a vast number of people excluded from formal employment, Brazil is considering a shift to the political left.

Bolsonaro has claimed to possess evidence of electoral fraud, but never presented any, even after the electoral authority set a deadline to do so. He said as recently as Sept. 18 that if he doesn’t win in the first round, something must be “abnormal.”

Analysts fear he has laid the groundwork to reject results.

Da Silva, 76, was once a metalworker who rose from poverty to the presidency and is credited with building an extensive social welfare program during his 2003-2010 tenure that helped lift tens of millions into the middle class.

But he is also remembered for his administration’s involvement in vast corruption scandals that entangled politicians and business executives.

Da Silva’s own convictions for corruption and money laundering led to 19 months imprisonment, sidelining him from the 2018 presidential race that polls indicated he had been leading against Bolsonaro. The Supreme Court later annulled da Silva’s convictions on grounds that the judge was biased and colluded with prosecutors.

Social worker Nadja Oliveira, 59, said she voted for da Silva and even attended his rallies, but since 2018 votes for Bolsonaro.

“Unfortunately the Workers’ Party disappointed us. It promised to be different,” she said in Brasilia.

Others, like Marialva Pereira, are more forgiving. She said she would vote for the former president for the first time since 2002.

“I didn’t like the scandals in his first administration, never voted for the Workers’ Party again. Now I will, because I think he was unjustly jailed and because Bolsonaro is such a bad president that it makes everyone else look better,” said Pereira, 47.

Bolsonaro grew up in a lower-middle-class family before joining the army. He turned to politics after being forced out of the military for openly pushing to raise servicemen’s pay. During his seven terms as a fringe lawmaker in Congress’ lower house, he regularly expressed nostalgia for the country’s two-decade military dictatorship.

His overtures to the armed forces have raised concern that his possible rejection of election results could be backed by top brass.

On Saturday, Bolsonaro shared social media posts by right-leaning foreign politicians, including former U.S. President Donald Trump, who called on Brazilians to vote for him. Israel’s former Prime Minister Benjamin Netanyahu expressed gratitude for stronger bilateral relations and Hungarian Prime Minister Viktor Orbán also praised him.

Leda Wasem, 68, had no doubt Bolsonaro will not just be reelected. Wearing a jersey of the national soccer squad at a polling place in downtown Curitiba, the real estate agent said an eventual da Silva victory could have only one explanation: fraud.

“I wouldn’t believe it. Where I work, where I go every day, I don’t see a single person who supports Lula,” she said.

___

Savarese reported from Sao Bernardo do Campo. AP writers Daniel Politi and Carla Bridi reported from Curitiba and Brasilia.