After the most polarized and divisive campaign in its modern history, Brazil has elected as its next president a right-wing politician who openly disdains human rights and admires military dictators.

Jair Bolsonaro, a 63-year-old congressman who had strong evangelical backing for his law-and-order stance on policing, support for gun rights and opposition to abortion, won 55 percent of votes. Bolsonaro’s leftist competitor, Fernando Haddad, a former education minister and ex-mayor of São Paulo, received 45 percent of the roughly 100 million ballots cast.

Bolsonaro’s angry, populist campaign rhetoric led many newspapers and public figures worldwide to declare his candidacy a threat to democracy. But 57.8 million Brazilians on Sunday showed less concern about Bolsonaro’s message.

Haddad, his opponent, joined Brazil’s presidential race less than a month before the first round of voting. The Workers Party, which has run Brazil since 2002, tapped Haddad to replace front-runner Inacio Lula de Silva, a wildly popular former president jailed on corruption charges in July. Haddad was unable to retain Lula’s lead.

Brazil’s politics of disillusionment

Bolsonaro’s victory will likely worsen an already acute crisis in Brazil, the second-most populous nation in the Western Hemisphere.

Once a rising star in the developing world, Brazil has been mired in severe recession and political turmoil since 2015. Hundreds of politicians, including former President Lula, have been arrested and jailed in a judicial investigation that has exposed corruption at the highest levels of government.

That corruption has consequences: A survey conducted in August by the Brazilian Institute of Public Opinion and Statistics showed that only 25 percent of citizens trusted their federal government and 18 percent trusted Congress.

In such circumstances, Bolsonaro’s win as an anti-establishment candidate was predictable – and not just because Bolsonaro had maintained a clear lead in the polls ever since Lula withdrew in September.

When voters don’t believe in their politicians or government institutions, candidates who tap into voter disdain for the political system can find success. In my scholarly research on democratization, this is what I call the “politics of disillusionment.”

This phenomenon helped conservative outsiders to win in the United States, Italy and Hungary.

Now, disillusionment in Brazil has handed victory to a right-wing populist who promises to purge the country of his leftist opponents.

“Either they go overseas, or they go to jail,” he told a huge crowd in São Paulo in one of his last appearances before Sunday’s vote.

Inflammatory rhetoric and militarism

Bolsonaro has been in Congress for three decades. But to harness popular rage against the system, his campaign offered an outsider’s scathing critique of Brazilian society.

In response to rampant political corruption and extreme violence in Brazil, Bolsonaro defended military dictatorships like the one that ran Brazil from 1964 to 1985. The only problem with Brazil’s former authoritarian leaders, Bolsonaro said, was that they “tortured rather than killed” dissenters.

Critics say his adulation of the military raises serious doubts about the future of Brazil’s 33-year-old democracy.

Bolsonaro, a former army captain, regularly uses homophobic, misogynistic and racist rhetoric against large swaths of Brazil’s population. He has said that he would “never allow” his children to get romantically involved with a black person and that he was “incapable of loving a homosexual son.”

Bolsonaro also once told a fellow congressional representative that she “did not deserve to be raped” by him because she was “terrible and ugly.”

His candidacy was met by outrage and mass protest by women.

The president-elect’s ambiguous policy agenda

Beyond his inflammatory rhetoric, Bolsonaro has offered few specifics about how he would govern Brazil.

He skipped presidential debates and avoided tough questions about whether he would make economic and political reforms to help get Brazil out of its three-year-long crisis.

To tackle record-high crime, the president-elect has said he will ease gun laws and reduce the age of criminal responsibility from 18 to 16. He is a staunch proponent of restarting the death penalty in Brazil, saying he would “volunteer to kill those on death row” himself.

Brazil has the world’s third-largest prison population. Sixty-four percent of those incarcerated are black.

Bolsonaro also wants to end affirmative action at Brazilian public universities.

He considers abortion to be murder. The procedure is banned in Brazil, but in recent years women’s groups have been pushing to liberalize abortion laws. That is unlikely to happen under Bolsonaro.

Some analysts have suggested that Congress may rein in Bolsonaro’s more radical tendencies. But evidence from the United States and elsewhere suggests that in the politics of disillusion, presidents who campaign as extremist govern as extremists.

Bolsonaro takes office on Jan. 1. Brazil’s political institutions, already weakened by corruption and public outrage, will face great pressure to show that they can withstand the new president’s populist ambitions and militaristic instincts.

It is a daunting challenge for Brazil’s young and, I fear, faltering democracy.