ARTICLE AD BOX
By Katy Watson
BBC South America correspondent, Sao Paulo
When the results came through on Sunday evening, there were cheers for Lula - as well as tears - but the atmosphere felt more like a sense of relief than outright celebration.
This wasn't the first-round victory that his supporters had wished for. The polls released a day before the elections had predicted a 14 percentage point gap between Lula and Bolsonaro. They had hoped Lula could avoid a run-off but they vastly underestimated the support for the right-wing leader.
"I've never won an election in the first round, it's like destiny wants me to work a bit more," Lula said, trying to reassure people of his chances. "We are going to win the elections again, it's just a question of time."
Lula is still the front-runner and his position is still strong. But there is no doubt this has been a blow to the Lula campaign. In the past few weeks, there had been a concerted effort by his supporters to try and encourage wavering voters to choose Lula, to end the Bolsonaro presidency promptly.
The show of strength from the right - not just from Bolsonaro but prominent Bolsonaristas who were also elected to congress and as state governors - has taken people by surprise.
"Bolsonarism is much more alive and has a further reach than people had thought and polls had captured," says Esther Solano, a political scientist and Bolsonaro expert.
"What we underestimated was the network of regional Bolsonarism. We have to rethink how we are failing to measure the true reach of Bolsonarism in daily life across Brazil."
In his post-results speech, Bolsonaro adopted a more humble tone than in the past - a break from his often fiery politics about the left. Perhaps a conscious effort to win over those who are still undecided.
"I know there's a desire to change from people but there are certain changes that can be for the worse," he said.
"We tried to show that during the campaign but clearly that didn't get through to the most important layers of society."
Bolsonaro vowed to show people how to ensure Brazil wouldn't become Venezuela - it's a common comparison that the far-right makes when criticising the left.
In the run-up to this vote, Bolsonaro repeatedly said that the polls were a lie - and to many it looked like he was just a bad loser. But reflecting on Sunday's results, there are people who think that Bolsonaro has a point. It's certainly what Bolsonaro's supporters believe.
"It's time for liberty, for justice," says teacher Selma Cardoso who said the polls were biased. If Lula wins she's prepared to take action. "We'll go to the streets saying people are making a mistake. It's time to change - but peacefully."
But others who support the president threaten to take a more violent approach.
"There's going to be beautiful blood spilled in this city," Alessandro Ferreira Soares, a parachutist, told me if Lula takes the presidency. "I'm prepared to kill all the socialists and communists in the world."
It's these ominous threats that make people worried. These next four weeks are going to be intense - and personal. With two powerful political foes now going head-to-head, the campaign steps up several notches.
There's everything to play for in this presidential race - and everything to lose if you're on the wrong side. We saw political violence in the run-up to the first round and there's real fear there will be more of that ahead of the run-off.