With 98 percent of the ballots counted, Bolsonaro had 46.43 percent of the vote. That figure put him close to surpassing the 50 percent threshold needed to avoid a runoff on Oct. 28. His closest competitor, the leftist Workers’ Party candidate Fernando Haddad, was running a distant second with 28.7 percent.

AD

AD

Bolsonaro’s performance represented a stunning march forward for a burgeoning global movement of right-wing nationalists who have captured the top political jobs in the United States, Eastern Europe and the Philippines. Bolsonaro’s strongman approach to politics and his praise for the former military dictatorship have raised fears that he would move Brazil away from liberal democracy. Bolsonaro has denied such intentions.

“For someone with no TV time, a small party, no political funds and who has been hospitalized for 30 days, this is a great victory,” Bolsonaro — who was stabbed on the campaign trail last month — proclaimed in a Facebook Live post late Sunday.

Bolsonaro’s result was particularly surprising in Brazil — a nation that, just a few years ago, was seen as a leader of the international left under former president Luiz Inácio Lula da Silva. But Lula — as he is widely known — is now behind bars, part of a corruption probe that has tainted many Brazilian politicians.

AD

AD

Barred from running, Lula picked Haddad, a 55-year old former mayor of Sao Paulo, as a stand-in. But the vote for the long-ruling Workers’ Party was collapsing in key states. Haddad lost his home turf of Sao Paulo by a massive margin. Eleven other presidential hopefuls also posted dismal numbers.

“Today we’ll start to make Brazil great again,” tweeted Henrique Mecking, a Bolsonaro backer and computer programmer in the southern state of Santa Catarina.

Against the backdrop of a bankrupt political class, Bolsonaro — who ran a social media-driven campaign on a bargain-basement budget — presented himself as a tough outsider who zeroed in on three key issues: the economy, corruption and a terrifying crime wave.

AD

The presidential campaign has had echoes of the 2016 race for the White House, with Brazilians polarized over Bolsonaro’s history of incendiary remarks about women, minorities and the LGBT community. Bolsonaro toned down his rhetoric as he sought to expand his appeal but has been targeted by critics in a social media campaign, #EleNao, or #NotHim.

AD

Liberal Brazilians were aghast at the results and already speaking of a likely second-round defeat.

“R.I.P. myth of Brazil’s racial democracy,” Theresa Denise Williamson, who works with the favela communities in Rio de Janeiro, posted on an anti-Bolsonaro Facebook page.

A seven-term congressman, Bolsonaro has long loitered on Brazil’s political fringe. Yet, from the Amazon region to the beaches of Rio de Janeiro, Bolsonaro was winning votes even among groups he has insulted.

AD

“I voted for Bolsonaro because I’m tired of politicians being the same,” said Maria Aparecida de Oliveira, a 63-year-old housekeeper casting her ballot in an upper-middle class district of Sao Paulo, Brazil’s largest city. “Even if he is a little crazy, someone needs to bring change.”

Analysts expect an intense period of jockeying for political alliances in the coming weeks. But Bolsonaro and his supporters were claiming the clear momentum.

AD

In a country where not voting carries a small fine, almost a third of voters — or more votes than Haddad won — stayed home or cast blank or null ballots.

That movement will probably shrink the total electoral pool, giving Bolsonaro a potentially stronger shot, some say. Yet Haddad will seek to pick up the votes cast for a flurry of other center-left and left-wing candidates as he seeks to leapfrog the front-runner.

AD

“Bolsonaro is a strange phenomenon,” said Lucas de Aragao, director of Arko Advice, a political risk company in Brasilia. “It’s very hard to understand his movement, the why, the how. It doesn’t have any precedent in Brazil. Even some Lula voters are turning to him. It’s happened because Brazil loves this idea of a savior, of a hero. And Bolsonaro now represents this image of a savior as much as Lula does.”

AD

Just a few years ago, Brazil saw a surge of progressive policies under Lula, who while president from 2003 to 2011 pushed through generous welfare programs and labor rights. He governed during a commodities boom that lifted millions out of poverty, and he left office with a dizzying approval rating of 87 percent.

Lula vowed to win back the presidency this year and shot to the top of the polls. But he became engulfed in a sweeping corruption investigation and in April began serving 12 years in prison.

AD

Haddad, his replacement, is a shy, pragmatic economist of Lebanese background, a shadow of the larger-than-life Lula. He has tried to reassure investors that he would not pursue radical leftist policies, but many still worry he would not pass the tough reforms seen as necessary to avoid another economic crisis here. Many in the business community have backed Bolsonaro and his economic guru, the University of Chicago-trained Paulo Guedes.

AD

Speaking to supporters late Sunday, Haddad said the results had put Brazilian democracy at risk.

“This second round is a golden opportunity. We need to make use of it with a sense of responsibility,” he said.

Despite having legalized same-sex marriage and set up quotas for minorities in universities, Brazil remains a socially conservative and religious nation. Bolsonaro has earned key support among an increasingly powerful group: evangelical voters.

AD

Many of Bolsonaro’s core backers are also huge fans of Trump — a leader with whom Bolsonaro shares striking parallels. Bolsonaro is a tough talker whose strongest followers include white men who feel left behind by economic and social change. He champions “traditional values” but has been married three times. He reaches out to his legions of followers via social media.

AD

Bolsonaro has been vague on the details of his proposed policies. But he has vowed to loosen gun laws and crack down on the violent street gangs that control Brazil’s drug trade. He backs the free market but has criticized Chinese investment — saying he will work with Beijing but that “we will not hand our territory over to anybody.”

He has pledged to stop attempts to loosen strict abortion laws and has alarmed environmentalists by saying he would seek development in the Amazon.

AD