Jair Bolsonaro, far-right lawmaker and presidential candidate of the Social Liberal Party (PSL), gestures after casting his vote, in Rio de Janeiro, Brazil October 7, 2018.Pilar Olivares / Reuters

Jair Bolsonaro, the former army captain who dominated the first round of Brazil’s presidential election on Sunday, talks a lot about killing people—common criminals, political opponents, the organizers of queer-art shows. Promising to cleanse the nation of corruption, he holds up the 1964–85 military dictatorship, when torture was state policy, as “a period of glory for Brazil.” Since Brazil’s return to democracy a generation ago, no major politician has spoken like this. But it turned out to be highly effective in an atmosphere of seemingly unending crisis, both economic and political—and one in which more than 60,000 people were murdered last year.

Bolsonaro still must win the runoff on October 28. But by taking 46 percent of the vote in the first round of elections on Sunday, he nearly claimed an outright majority, which would have prevented a second round altogether for the first time in 20 years. Making a mockery of the latest polls, other far-right populists edged out established candidates in governor’s races. Bolsonaro’s Social Liberal Party, which previously had eight seats in Congress, will now have 52, second only to the left-wing Workers’ Party (PT). In São Paulo, Bolsonaro’s son Eduardo—who recently tweeted a photo of himself standing beside the former Donald Trump adviser Steve Bannon, a supporter—won the most votes of any congressional deputy in Brazil’s history.

Bolsonaro would appear to be part of the same anti-establishment wave that brought the world Trump and Brexit. But unlike in the United States and Britain, democracy is barely a generation old in Brazil; its institutions are still fragile, and the precarity of its working class far more acute. And so Bolsonaro’s victory later this month feels both highly probable and especially dangerous. His running mate is a general who has talked casually about carrying out an autogolpe—a “self-coup”—if one of the three branches of government fails to do its job. His followers, meanwhile, have taken to chanting “Bolsonaro is going to kill the fags” on the street. Yesterday, some posted videos of themselves bringing pistols into voting booths.

During several days in Rondônia, a largely rural state on the frontier of the Amazon, I got a sense of the coming swell. I talked to a dozen people of various backgrounds. All but one planned to vote for Bolsonaro. They didn’t seem concerned about the fate of their democracy—they didn’t even mention democracy. Instead, they railed against welfare benefits for criminals, LGBT-friendly education for their kids, and the outrageous corruption of the political class. A driver for a local ride-share service told me, “At this point maybe only a guy with crazy ideas can fix this mess. After all, it can’t get worse than it already is, right?”

It’s not just the poor and the poorly educated who yearn for a strongman. Business leaders were initially put off by Bolsonaro’s fervor, common in the Brazilian military, for state intervention in the economy. But then he tapped a quasi-libertarian with a doctorate from the University of Chicago as his economic adviser, and the chance to propose cutting pensions and peeling back labor regulations proved too tempting to pass up. Now the stock market rallies when Bolsonaro gains in polls. Luciano Hang, the owner of a chain of department stores that feature towering replicas of the Statue of Liberty, has threatened to fire his 15,000 employees if Bolsonaro doesn’t become president.

Bolsonaro’s rise would likely have been impossible without social media: Nine out of 10 Brazilians now use WhatsApp, where Bolsonaro-friendly memes and fake news run rampant. Though he has been a congressman since 1991, he never passed any significant legislation. He made his name as a culture warrior—saying, for example, that he’d prefer a dead son to a gay son, and that the descendants of escaped slaves are useless even for procreating, and, to a female member of congress, “I won’t rape you because you don’t deserve it.” The surprise came when his message resonated outside the far-right bubble. In a country where nearly 30 percent of the population now identifies as evangelical, appeals to “family values” work like perhaps never before.

You can’t fully understand Bolsonaro’s appeal, though, without considering his foil: former President Luiz Inácio Lula da Silva. While many still love Lula for lifting more than 30 million people out of extreme poverty, Dilma Rousseff, his handpicked successor, led the country into its current crisis; Lula himself is now in prison on corruption charges. Unable to run this year, he anointed Fernando Haddad, a former political-science professor and one-term mayor of São Paulo, as his next heir. Few had heard of him until a flood of ads repeated the mantra “Haddad is Lula! Lula is Haddad!” As Haddad shot up in the polls, though, his disapproval rating rose even faster.

Bolsonaro—whose middle name is the Portuguese word for “messiah”—was also blessed with a freak aura of destiny. A month ago, as he was being carried aloft at a rally, a mentally disturbed man stabbed him in the gut. He spent the next few weeks campaigning from a hospital bed, spared from scrutiny at live debates. His first public address after the attack, which one of his sons recorded on a phone, was something straight out of a telenovela. Visibly pained and occasionally tearing up, he warned of a plan by the PT to falsify the vote (without presenting any proof, naturally). “What’s at stake now is your future,” he said in a halting voice. “Even those of you who support the PT—you’re a human being, too.” His allies went further, suggesting that the PT had actually orchestrated the assassination attempt.

Even after outperforming all the polls on Sunday, Bolsonaro doubled down on his favorite themes. In a video posted to Facebook, he said he would have won an outright majority if not for Brazil’s dubious electronic-voting machines. He blamed the PT for destroying the economy, warning, “We can’t keep flirting with communism and socialism.” He also said he would “put a final stop to all forms of activism in Brazil.”

Haddad, in his own speech on Sunday, couldn’t help but play into Bolsonaro’s hands, praising Lula, his political godfather, despite Brazilians’ overwhelming support for the corruption investigations that landed him in prison. Next to Haddad was his running mate, Manuela D’Ávila—also chosen by Lula—from the Communist Party of Brazil. It may be difficult for Haddad to appeal to the center. Though he’s from the moderate wing of the PT, others in his party have praised Venezuela’s Nicolás Maduro, Bolsonaro’s favorite Communist bogeyman. Haddad did speak of uniting all those who believed in democracy—a noble message. But it remains to be seen if it will win over Brazilians who have lost faith in democracy altogether. The PT has already run ads comparing Bolsonaro directly to Hitler, and still Bolsonaro’s support has only grown. Live debates are scheduled, but Bolsonaro, despite having recovered from surgery, may well come up with another excuse to dodge them.

Ahead of the runoff, the question is what will prove stronger: hatred of the PT or fear of Bolsonaro. At a debate last week, the socialist candidate Guilherme Boulos explained in stark terms what’s at stake: “When I was born, Brazil was under a dictatorship. I don’t want my daughters to grow up under a dictatorship. It always begins like this.”

We want to hear what you think about this article. Submit a letter to the editor or write to letters@theatlantic.com.