This post is part of Polyarchy , an independent blog produced by the political reform program at New America , a Washington think tank devoted to developing new ideas and new voices.

For years, Brazil’s judiciary massive multi-year probe to root out corruption from the political class has made headlines. Many politicians, from the lowly elected official to a succession of presidents, are being implicated, arrested, and tried. The system might be working to root out corruption, but a nasty side effect is that it is also eroding Brazilians’ faith in democracy. The more politicians are exposed, the more Brazilians pine for authoritarianism.

Brazil’s battle against corruption shows that a system of checks and balances is no guarantee of support for democracy. It shows that when people are unhappy with their governments, they’re not necessarily more appreciative of democracy and the fact that they can just vote politicians out of office. In fact, much like in the US and in democracies across Western Europe — as Yascha Mounk and Roberto Stefan Foa’s work on democratic deconsolidation shows — a decline in trust in political institutions is making people more open to authoritarian alternatives such as military rule.

In 2016, Brazilians’ support for democracy fell by 22 percent. Not only has support gone down to 32 percent (from 54 percent in 2015), but 55 percent of Brazilians say they wouldn’t mind a nondemocratic government as long as it “solved problems.”

Brazil’s military regime, in place from 1964 to 1985, was the result of a coup that brought down the then-democratically elected President João Goulart. The country went through two decades marked by violence, torture, exile, censorship, and, of course, corruption. Brazilians still search for loved ones who went missing after they criticized the military government, never to be seen again.

But memories of oppression are beginning to fade: A new nostalgia for military dictatorship is everywhere, propelled by a chaotic economy, high levels of inequality and crime, and a corrupt political system.

It’s easy to meet Brazilians — old and young — who believe no politician is free from corruption, and that the only way to “fix the system” is by starting anew with a complete military overhaul of the government. Here’s why, and why that’s worrisome:

The economy is really, really bad

Ten years ago, Brazil began to enjoy a growth boom under Luiz Inácio Lula da Silva’s two-term presidency. Thirty million Brazilians were lifted out of poverty, and 21 million of them made it to the middle class. Low rates of unemployment meant that for the first time, millions of people could buy refrigerators, go on vacation, and attend college. Brazil’s economy was among the 10 largest in the world, and the “Third World country” label no longer applied to the Latin American giant. Lula was one of the most popular politicians in the world, and Brazil was finally gaining respect from the international community.

Fast-forward a decade and a half, and some 13.5 million Brazilians have lost their jobs, the country’s reputation is in shambles, and the economy can’t seem to get over its worst recession in the past 30 years. Between 2012 and 2016, while the world’s economy grew by 3.4 percent on average, Brazil’s economy shrank by 0.4 percent every year.

Brazilians feel powerless and hopeless, because they can’t see an end to their misery. According to a study based on census data, between 2014 and 2015, 4.1 million Brazilians were in poverty, of which 1.4 million were considered to be in “extreme” poverty, with a monthly per capita income of $22. Despite an increase in consumer spending and industrial productivity, and falling inflation and unemployment rates, Brazilians still don’t feel or see any improvement.

That’s seen, for example, in the 82 percent rise in the number of Brazilians who have left the country to live abroad between 2014 and 2016. For those who can’t afford to leave the country, informal gigs — like selling food on the streets — have become not just a way to supplement incomes but, for some people, their only source of income. Brazilians have no money, and neither does the government: The country is facing a budget deficit of $50 billion.

In an attempt to increase revenue, Michel Temer — the current president of Brazil, who replaced former President Dilma Rousseff (after she was convicted of manipulating the budget) — has put in place austerity measures, which have not been well received by the majority of Brazilians.

In Brazil, social security expenditures account for 11.3 percent of GDP — one of the highest in the world, which costs a lot for the federal government. So one of Temer’s policy ideas has been to raise the retirement age, something that has infuriated Brazilians who saw their much-awaited retirement be pushed further away from them. Protests have ensued, but it’s still unclear whether he’s going to succeed. Temer also put in place a cap on federal expenditure for the next 20 years. That could mean even worse hospitals, schools, and transportation.

Brazilians are having a hard time understanding why they are the ones who have to pay for the mistakes of the political elites.

Ed Luce, an English journalist and the Financial Times’s chief US commentator and columnist, points out that “we are taught to think our democracies are held together by values” — that we all believe in the same principles of civil liberties, that we’re all equal, and that if we work hard, we’ll be okay. But what really keeps liberal democracies together is economic growth. When growth stagnates, diminishes, or is “monopolized by a fortunate few, things turn nasty.” During the 2008-’09 financial crisis, the Brazilian economy experienced growth (moving in the opposite direction of most of the rest of the world’s economies), and support for democracy reached a peak of 61 percent in 2010.

Thus, decline in support also makes sense when the country is still reeling from the worst recession in its history. Low levels of trust, bleak economic perspectives, and citizens’ increasing demands from their governments are a dangerous combo.

Seemingly everyone in the country is corrupt

And that, by itself, is not really a revelation to Brazilians. After all, corruption in Brazil is as mundane as soccer: always there, and part of the country’s identity. But what’s different now is that corruption has come to the forefront of the debate, with a “leave no stones unturned” investigative approach led by the now-famous Judge Sérgio Moro. A slew of corruption scandals have piled up, and the supreme court authorized dozens of investigations that seem to be nowhere near ending.

Rousseff’s impeachment was not the cure-all that those who pushed for her removal had hoped for. Temer, her successor, almost got the boot last month under accusations of taking $150,000 from the meatpacker JBS to facilitate the firm's businesses in the country. A new corruption probe against him has just been authorized by the supreme court. Lula was sentenced to nearly 10 years in prison for being given an apartment worth 2.2 million reals ($690,000) by a construction firm that had received padded contracts for work on an oil refinery.

More broadly, political parties have been gutted by the investigations and convictions. It’s an entire political class distrusted by Brazilian voters. That’s dangerous because it sets the stage for “outsiders,” who oftentimes have no experience in elected office, or worse, who advocate for radical solutions to democratic problems.

Crime is out of control

Brazilians live in fear. The streets of Brazil haven’t been this unsafe in a long time. Sixty-two percent of people are afraid of walking on the streets at night, while 55 percent are afraid of the police. Children are being shot.

A study published in late 2016 showed that the number of homicides in Brazil has hit a new record: Nearly 60,000 people were killed — a 21.9 percent increase compared to 2003 numbers. In the northeast region of the country, which also happens to be the poorest one, the numbers are even more striking, with a growth of 100 percent in the number of homicides. Earlier this year, the state of Espírito Santo also made headlines for riots and chaos that ensued after the police force, which hadn’t received a raise for seven years, refused to work.

On TV, the nightly news is usually: a recap of the latest scandal, trial, or arrest, and then coverage of the soldiers fighting with gangs in Rio de Janeiro.

There, the police haven’t been paid in more than a year. So as a last-resort move to create an atmosphere of security and order after armed confrontations between the police and drugs gangs, the Justice Ministry has sent thousands of troops to the state; they’re staying there at least until the end of the year. Criminal homicides have gone up by 10 percent from January to June in comparison with the same period last year. Violent deaths resulting from attempted robbery have risen 21 percent. Children can’t go to school because of the police raids and violent conflicts with the gangs in the favelas, which often prove unsuccessful and do more harm than good.

The news organization Globo reported that every 54 hours, a police officer is killed in the state of Rio. No wonder residents and visitors feel that the police can no longer protect them. The police can’t even protect themselves.

Inequality keeps going up, and the rich always win

Brazil is one of the most unequal countries in the world. And while rapid economic growth has brought gains that benefited the country at a macro level during Lula’s presidency, the country is still deeply divided between those who are extremely rich and those who are extremely poor.

A new study from the World Wealth and Income Database, led by the French economist Thomas Piketty, points to Brazil’s “extreme and persistent inequality.” A comparison between Brazil and other countries like the US, China, and South Africa shows at least an 8 percent difference in share of income in the hands of the 1 percent. In Brazil, their national income share is 28 percent, while in China that number is 14 percent. While the share of those at the bottom 50 percent rose from 11 to 12 percent, the study points out that “inequality among the bottom 90 percent declined at the expense of growing concentration at the top.”

A 10-minute drive in the city of São Paulo can take one from the high-end shopping on Oscar Freire Street, with stores like Chanel and Louis Vuitton, to favelas, where homelessness and crime are ubiquitous. Luxury apartments and favelas are right next to each other, and while some lucky Brazilians are vacationing in Europe, others can barely make ends meet.

For many Brazilians, it’s clear that they are not all treated and served equally by the government. In fact, only 10 percent of them believe that the government works on behalf of everyone. The rich seem to matter more. And when people feel like the system is no longer working for them, and that everyone is not in it together, they are more likely to look for something different.

The evangelical movement and conservatism are on the rise

The number of Brazilians who identify as evangelical Christians has gone up to 22.2 percent from 6.6 percent. In the National Congress, evangelical Christian lawmakers have seen their numbers soar, thanks to the financial support from churches led by Silas Malafaia (from Assemblies of God Church) and Edir Macedo (from Universal Church). The evangelical bloc has become more powerful, better funded, and increasingly more influential and popular.

The growth in the number of evangelical Christian Brazilians goes in tandem with the growth in number of those who identify as socially conservative. A 2016 poll showed that in the past six years, Brazilians of all ages, all levels of income and education, and both sexes have become more conservative. Fifty-four percent of the respondents have shown a rightward shift on issues such as abortion, same-sex marriage, the death penalty, lifetime imprisonment, and lowering the legal age at which juveniles can be tried as an adult.

These are people who are deeply dissatisfied with policies that they deem too liberal. Malafaia, for example, has said things like, “No human being has absolute power over her body,” that he loves homosexuals as much as he loves criminals, and that the right to marriage in the US is only another chapter in the moral decadence of the country. His church has more than 100 congregations spread around the country. He says the believers should be politicized, so that they can defend Christian principles.

What’s next, and what we should be worried about

The decline in support for democracy is also regional. Latinobarómetro is a nonprofit that studies public opinion in Latin America and asks people across the region a series of questions to gauge their feelings about democracy and their trust in democratic institutions. Their latest report shows that trust has been on the decline throughout the region since 1995 (when it first started polling).

When compared with respondents in other Latin American countries, Brazilians were the second least likely to support democracy. Ironically, now that Brazilian democracy is starting to really work, uncovering corruption that has plagued the country for decades, citizens are sick of it.

It’s in this environment that someone like Jair Bolsonaro, a former military officer and candidate to the presidency, thrives. His misogynistic, racist, homophobic, xenophobic remarks have earned him comparisons to Donald Trump. Bolsonaro is an avid advocate to a return of generals to the highest public office. After more than two decades advocating for a return to military rule, his rhetoric is finally catching up to public opinion. The “law and order” rhetoric he uses is appealing to Brazilians who see the ex-military, anti-establishment candidate as the perfect antidote to the current sick system. And while his popularity levels are low and his candidacy uncertain, he has found a segment of the Brazilian population that seems pleased with his approach to “fixing” Brazil.

Most concerning, however, is not Bolsonaro being elected, but rather the combination of factors that could lead to a return to dictatorship.

A bad economy, a corrupt political class, fear of violence, and rising inequality make the return to dictatorship a real possibility in the minds of many Brazilians. Brazil’s young democracy is less resilient than older, more established democracies like the US or the UK. Brazilian democracy faces one of its most crucial moments. Brazilians’ disenchantment with democracy as a result of its unkept promises of prosperity, safety, and accountability represent a real danger to the future of the country — and the region as a whole.