RIO DE JANEIRO — In the early morning hours on Monday, President Jair Bolsonaro of Brazil went to bed vindicated. The night’s election results had shown, just as he had claimed, that the polls had severely underestimated the strength of his right-wing movement.
Hours later, he awoke to a new challenge: How to obtain millions more votes in just four weeks?
On Oct. 30, Mr. Bolsonaro will face a leftist challenger, the former president Luiz Inácio Lula da Silva, in a runoff election to lead Latin America’s largest nation.
Now the contest — a matchup between Brazil’s two biggest political heavyweights — could swing either way and promises to prolong what has already been a bruising battle that has polarized the nation and tested the strength of its democracy.
“Lula is still the favorite, but you can totally imagine this becoming a Bolsonaro victory,” said Oliver Stuenkel, a Brazilian political scientist. “If you add up all the numbers of the third-party candidates, there are sufficient votes out there.”
Mr. da Silva, known universally as Lula, finished first on Sunday with 48.4 percent of the vote, versus 43.2 percent for Mr. Bolsonaro. That put Mr. da Silva about 1.85 million votes shy of the 50 percent he needed for an outright victory in the first round, while Mr. Bolsonaro came up 8 million votes short.
What now makes the race unpredictable is that so many other votes appear up for grabs. Nearly 10 million people cast ballots on Sunday for candidates who are now out of the contest, with roughly a third of those votes going to a center-left candidate and two-thirds to center-right candidates. An additional 38 million people cast blank ballots or did not vote.
As the campaign enters a second phase, both sides have expressed confidence. Mr. da Silva said he welcomed the opportunity to finally debate Mr. Bolsonaro head-to-head, while Mr. Bolsonaro said he believed his campaign had the momentum and a plan for victory.
On Monday, Mr. Bolsonaro was already using the tools of his office to his advantage. He moved up to next week the delivery of $115 checks for low-income Brazilians, part of a monthly welfare program that he recently expanded in a last-minute bid to lure more support. On Sunday night, Mr. Bolsonaro cited that assistance as one reason he outperformed predictions by polls.
Pollsters had forecast that Mr. Bolsonaro would receive roughly 36 percent of the vote, more than 7 percentage points below his actual tally. They had overestimated Mr. da Silva’s support only slightly.
The question of why the polls had underestimated Mr. Bolsonaro’s support confounded Brazilian political circles on Monday. Pollsters speculated that voters were dishonest because they were ashamed to admit they were voting for the president, whose false claims on a variety of issues have made him a pariah in some circles, or that they simply lied to sabotage the forecasts. Mr. Bolsonaro has railed against the polling industry — on Sunday night he called them liars — and many of his supporters have followed suit.
Things could get even more complicated ahead of the runoff. Mr. Bolsonaro’s chief of staff, Ciro Nogueira, urged the president’s supporters to reject any pollsters wanting to interview them.
“That way, it’ll be certain from the start that any of their results are fraudulent,” he wrote on Twitter to his 100,000 followers. He then suggested the pollsters got it wrong on purpose. “Only a deep investigation will tell,” he said.
Antonio Lavareda, the president of Ipespe, a top polling company, said he needed to examine the effect of voters staying home; 21 percent of the electorate did not vote, the highest share since 1998. He also speculated that many people who said they would vote for third-party candidates switched to Mr. Bolsonaro at the last minute.
But despite his firm’s inaccurate forecasts for the president in the first round, Mr. Lavareda still made a bold prediction: Mr. da Silva’s 48.4 percent support on Sunday meant that “it’s practically impossible” he does not win on Oct. 30.
Still, the fallout from the polls left a bad taste for many Brazilians and experts.
“I’ve sworn off polls for the next four weeks,” said Brian Winter, a Latin America analyst with Americas Society/Council of the Americas, a group that pushes free trade in the Americas. “Their methodology is broken.”
The survey forecasts and lack of clarity in the race could lead to a tense situation when the results are revealed on Oct. 30. Mr. Bolsonaro has for months told his supporters to suspect voter fraud — despite offering no evidence — and he has suggested that the only way he could lose is if the election is stolen.
Those unsubstantiated claims appear to have persuaded millions of voters in Brazil.
On Sunday night, many of Mr. Bolsonaro’s supporters were already claiming foul play. “It’s fraud. Lula can’t be ahead of Bolsonaro,” said Yasmin Simões, 28, a retail employee gathered outside Mr. Bolsonaro’s home in a beachside neighborhood in Rio de Janeiro. “If Lula is elected — by fraud — there’s definitely going to be a revolt, and I’m in.”
Some prominent conservative pundits also began pushing claims, without evidence, that something fishy had occurred in Sunday’s voting.
“I think it’s VERY possible that there was fraud,” Rodrigo Constantino, a right-wing Brazilian pundit who lives in Florida, wrote to his 1.3 million followers on Twitter. “The ONLY GOAL has to be to win so many votes for Bolsonaro that not even a strange algorithm can change it!”
The vote on Sunday delivered good news for conservatives in most governor and congressional elections, including many candidates closely aligned with Mr. Bolsonaro. At least eight of his former ministers were elected to Congress, including several who were once shrouded in scandal. Overall, Mr. Bolsonaro’s political party picked up 29 seats in Congress, giving it 112 in total, the biggest party in both the House and Senate.
As a result, if elected to second term, Mr. Bolsonaro could be emboldened by his effective control of Congress and more significantly remake Brazilian society in his vision. For Mr. da Silva, the conservative Congress could complicate his efforts to govern.
The success of Mr. Bolsonaro’s allies and his stronger-than-expected support also shows that he maintains a firm grip on the conservative movement in Brazil.
“Brazil’s moderate right is a political wasteland,” Mr. Stuenkel said. “Part of the extreme polarization in Brazil is that, on the right, Bolsonaro reigns supreme.”
Over the next four weeks, Mr. Bolsonaro’s team plans to target the swing state of Minas Gerais, where it believes it can pick up one million votes, and look to improve its results in Mr. da Silva’s stronghold in Brazil’s Northeast, said Fábio Faria, Brazil’s communications minister and a senior adviser to the president. “We are really confident,” he said.
Mr. da Silva’s campaign plans to highlight Mr. Bolsonaro’s string of false statements and show that the economy performed far better during Mr. da Silva’s two terms, from 2003 through 2010, than during Mr. Bolsonaro’s tenure.
“It will be the first chance for us to have a tête-à-tête debate with the president,” Mr. da Silva told supporters Sunday night. “Is he going to keep telling lies or will he, at least once in his life, tell the truth to the Brazilian people?”
Mr. da Silva had focused his campaign on raising taxes on the rich to expand services for the poor, but — after Sunday’s results — analysts predicted that he would moderate his stump speech in order to attract more centrists.
“You have to go to the Bolsonaro corners of the country,” said Senator Jean-Paul Prates, a senior adviser to Mr. da Silva’s campaign. “You have to show your face, smile at these people in the south, the midwest, and talk about the things that concern their lives.”
In the eight previous presidential elections in Brazil’s modern democracy, the candidate that has led in the first round has never lost in the second. But the 5 percentage points separating Mr. Bolsonaro and Mr. da Silva are also the slimmest margin between two candidates in a runoff.
As a result, Mr. Winter said, “this is going to be a white-knuckle race.”