SAO PAULO — Far-right congressman Jair Bolsonaro has won Brazil’s elections, taking an unassailable lead Sunday in the race for the South American nation’s presidency, as voters apparently looked past warnings that the brash former army captain would erode democracy and embraced a chance for radical change after years of turmoil.

With more than 92 percent of the votes counted, 55.6 percent supported Bolsonaro, compared to 44.4 percent for leftist Fernando Haddad of the Workers’ Party, according to the Supreme Electoral Tribunal. Final results were expected later Sunday.

After the results were announced supporters flooded the streets outside Bolsonaro’s home in Rio de Janeiro, letting off fireworks and waving Brazilian flags.

Get The Times of Israel's Daily Edition by email and never miss our top stories Free Sign Up

He will take office on January 1, 2019.

Bolsonaro went into Sunday the clear front-runner after getting 46 percent of the vote to Haddad’s 29 percent in the first round of the election Oct. 7, which had 13 contenders. After opinion polls in recent weeks had Bolsonaro leading by as much as 18 percentage points, the race had tightened in recent days as several Brazilian heavyweights came out against Bolsonaro, arguing that he was a direct risk to the world’s fourth largest democracy.

Bolsonaro, who cast himself as a political outsider despite a 27-year career in Congress, is the latest of several leaders around the globe to gain prominence by mixing tough, often violent talk with hard-right positions. But he is also very much a product of a perfect storm in Brazil that made his messages less marginalized: widespread anger at the political class amid years of corruption, an economy that has struggled to recover after a punishing recession and a surge in violence.

“I feel in my heart that things will change,” said Sandra Coccato, a 68-year-old small business owner, after she voted for Bolsonaro in Sao Paulo. “Lots of bad people are leaving, and lots of new, good people are entering. There’s a light at the end of the tunnel.”

Bolsonaro is highly divisive among Jewish voters: He is ardently pro-Israel, but has also run a campaign pledging to restore law and order and fight corruption with language some have called “fascist” and worse.

Bolsonaro has declared he will move the Brazilian embassy to Jerusalem from Tel Aviv. His first international trip as president, he said, will be to Israel, with which he will seek to broaden the dialogue. And he promised to close the Palestinian embassy in Brasilia.

Bolsonaro rose in prominence amid disgust with Brazil’s political system. In particular, many Brazilians are furious with the Workers’ Party for its role in the graft scheme, known as “Carwash” and Haddad has struggled to build momentum with his promises of a return to the boom times by investing in health and education and reducing poverty.

But he has also raised serious concerns that he will usher in a rollback of civil rights and a weakening of institutions in what remains a young democracy, especially since he has waxed nostalgic for Brazil’s 1964-1985 military dictatorship and said he would name military men to his Cabinet.

In a highly unusual moment, the chief justice of the Supreme Court, Jose Dias Toffoli, read out part of the Constitution to reporters after he voted.

“The future president must respect institutions, must respect democracy, the rule of law, the judiciary branch, the national Congress and the legislative branch,” Toffoli said in remarks many took to be a rebuke of Bolsonaro and his more extreme positions.

As late as Sunday morning, Haddad was still holding out hope that he could win after several key endorsements late Saturday.

Among them were a popular former Supreme Court justice, Joaquim Barbosa, who tweeted support for Haddad, saying Bolsonaro’s candidacy scared him. Likewise, former Attorney General Rodrigo Janot, one of the biggest crusaders against corruption in Haddad’s Workers’ Party in recent years, endorsed Haddad for similar reasons.

One of the most important endorsements, particularly for young people, came from Youtuber Felipe Neto, whose channel has nearly 27 million followers.

Neto said he was troubled by Bolsonaro’s comments a week ago that “red” leftists would be run out of Brazil.

“In 16 years of the (Workers’ Party), I have been robbed, but never threatened,” Neto said by Twitter.

The past few years in Brazil have been exceptionally turbulent. In 2016, then-President Dilma Rousseff of the Workers’ Party was impeached and removed from office on charges that many on the left felt were politically motivated. The economy suffered a two-year-long recession and is only beginning to emerge, with growth stagnant and unemployment high. And scores of politicians and executives have been jailed in the Carwash corruption investigation that uncovered a multi-billion-dollar scheme to trade public contracts and official favors for bribes and kickbacks.

That instability unleashed extreme anger with the political class but also revealed deep divisions in Brazilian society, and this campaign was the most polarized in decades. There were numerous reports of politically motivated violence, especially directed at gay people, whom Bolsonaro has disparaged. Bolsonaro himself was stabbed and almost died at a campaign event in early September.

“I’m not crazy about Bolsonaro. But he is our way to keep the Workers’ Party out of office,” said Rafaela Rosa, a 32-year-old teacher, after voting Sunday in Sao Paulo. “We have had enough corruption and now we need to clean up.”

Many observers predicted that a newcomer would emerge to harness that anti-establishment anger. Instead, support coalesced around Bolsonaro, who both is and isn’t an outsider: He has served for nearly three decades in Congress, but he has often been at the margins of that institution and he painted himself as just the strong man Brazil needed to dismantle a failing system. Bolstering his rebel image is his reputation for offensive statements and sometimes extreme views, including insulting women, gays and blacks.

Bolsonaro’s campaign first gained traction with his promises to go after violent crime in a country that leads the world in homicides and where many Brazilians live in daily fear of muggings or burglaries. But his vows to loosen gun laws and give police a freer hand to use force against suspects have also raised concerns that a Bolsonaro presidency could lead to a bloody crackdown and an erosion of civil rights.

The campaign gained momentum by winning over much of the business community with promises of enacting market-friendly reforms that would reduce the size of the Brazilian state, including cutting ministries and privatizing state companies.