Jair Bolsonaro gestures during a press conference he called to announce his intention to run for the Brazilian presidency, at a hotel in Rio de Janeiro on August 10, 2017. Apu Gomes / AFP / Getty

Hope is in short supply in Brazil. The country is struggling to recover from the worst recession in its history and more than 12 million Brazilians are unemployed. Violent crime is on the rise. A slew of scandals is sending an endless parade of politicians to prison for corruption. The latest major figure to fall in the ongoing anti-corruption purge is Brazil’s beloved former president Luiz Inácio Lula da Silva, an economic populist who helped lift millions of Brazilians out of poverty. Today, three judges at one of Brazil’s Federal Regional Tribunals in the city of Porto Alegre, ruled on whether Lula is guilty of crimes of corruption and money laundering, after he received a beachfront apartment plus $1.1 million-worth of improvements from a construction company in exchange for helping the company obtain contracts from the state-owned oil company Petrobras. Lula’s lawyers tried to convince the judges that there wasn't enough evidence to send him to prison for 12 years. But that wasn’t enough, and the court unanimously upheld the conviction. Lula’s conviction signals that no one, not even Brazil’s most popular president, is above the law.

Today’s news is also likely to further erode whatever remaining trust Brazilians feel for their country’s political elite. In a recent survey by Ipsos, 94 percent of Brazilians said they don’t feel represented by their politicians. José Maria de Souza Junior, an international relations professor at Rio Branco University in Sao Paulo, said Brazilians are facing a moral crisis. “When the economy is doing badly, when there are no jobs, we respond to that … We are very sensitive,” he said.

In recent years, as crisis has consumed Brazil, there has been a notable shift in political, social, and religious attitudes. According to a 2016 survey, 54 percent of the Brazilian population held a high number of traditionally-conservative opinions, up from 49 percent in 2010. The shift is particularly evident on matters of law and order: Today, more Brazilians are in favor of legalizing capital punishment, lowering the age at which juveniles can be tried as adults, and life without parole for individuals who commit heinous crimes. Observers have ascribed this phenomenon to Brazilians’ increasing fear of violence over the last few years. This rightward shift has been accompanied by a massive growth in the country’s Evangelical Protestant and Pentecostal churches, which constitute the greater part of Brazilian Protestantism. The percentage of those who identified as evangelicals in Brazil has grown from 6.6 percent in 1980, to 22.2 percent in 2010.

Perhaps the clearest articulation of this shift has been the rise of 62-year old military officer-turned-congressman Jair Messias Bolsonaro. In a time when corruption has tarnished Brazil’s political class, his blunt charisma, zeal for law and order, and rapport with Brazil’s evangelicals, have turned what would ordinarily be glaring weaknesses into strengths. He has defended the legalization of capital punishment, and argued that the “politics” of “human rights, and of the politically correct, give space to those who are against the law and on the side of criminals.” He has said he’d rather have “a dead son over a gay son” and that he would not rape a particular female deputy in congress because “she wasn’t worthy of it.” Political parties, congressmen, and even the Brazilian Bar Association,  have filed a total of 30 requests to have him removed from his position as federal deputy for the city of Rio de Janeiro, a position he’s occupied for nearly three decades, for actions that broke congressional decorum, like sending death threats to another member of Congress and saying the military regime that ruled Brazil for 30 years “should have killed more people.” He has shown no particular grasp of policy: When questioned about how he was planning on ensuring a fiscal surplus, keeping inflation low, and maintaining a floating exchange rate (known as Brazil’s macroeconomic tripod, which has been the basis of economy policy in the country since 1999), he said that the person who needed to understand such things would be his finance minister, who he’d appoint if elected.

Despite Bolsonaro’s considerable baggage, as of last December, 21 percent of Brazilians said they would vote for him for president in this year’s election should he choose to run. While that’s not enough to get him through the primaries, his rising popularity suggests a transformation in Brazilian society that may be picking up speed.

Bolsonaro was born in Campinas, a city in the outskirts of Sao Paulo, on March 21, 1955. In 1974, at the age of 19, he enrolled in the Academia Militar das Agulhas Negras, Brazil’s equivalent of West Point, eventually rising to the rank of captain. At the time, a military career was promising: Brazil had been under military rule since 1964, when a coup brought down the democratically-elected President João Goulart. Under the dictatorship, Brazil experienced rapid economic expansion. But these were also the “The Heavy Years,” when critics of the regime went into exile, and dissent was met with censorship, violence, and sometimes death.

Eventually, the debt-saddled regime began to crack. The oil shock of 1973 forced Brazil to increase its borrowing to compensate for the higher cost of oil, while the value of its exports depreciated due to global inflation. By 1985, popular protests and international pressure convinced the dictatorship to transition to civilian rule. Political parties were legalized, and the country readied itself to write a new constitution and hold free and fair elections.

Under the dictatorship, Brazil’s evangelical community largely stayed out of politics, as Paul Freston, a religion expert at the Balsillie School of International Affairs, has written. (The community’s slogan was “Believers don’t mess with politics.”) But as the dictatorship crumbled, Brazil’s evangelicals came to recognize their new strength: Democracy is a numbers game. And their own numbers were growing.

So in 1985, at a gathering in Anápolis in the rural state of Goiás, the leaders of the Assembly of God, a popular evangelical church, announced they would begin endorsing and supporting candidates to run for office and thus be part of the “Constituent Assembly,” which would write a new constitution for Brazil. Founded in 1911, the Assembly of God had chapters all over the country; evangelical candidates had a real shot at victory. With the slogan Brother votes for Brother, “the organized participation in politics by the major Pentecostal denominations” was a “big novelty” and the beginning of a new era, Freston told me.

Meanwhile, Bolsonaro was fed up with the treatment of his community—the military—under the new government. In a 1986 article for Veja Magazine titled “The Salary is Low,” he complained, with some justification, that the government had underfunded the military. In fact, all public employees in those years faced pay cuts when the government refused to adjust salaries for hyperinflation. One year later, Bolsonaro was arrested after giving an interview to Veja in which he detailed a plan, complete with sketches, to set off bombs at the Agulhas Negras Military Academy to draw attention to low salaries in the military. He would later deny that he was the author of the sketches, even though experts confirmed they were his. He was convicted for his “anti-ethical behavior,” but served only 15 days in a military prison after a successful appeal.

Bolsonaro’s outlandish plan created a media frenzy, and broadened his appeal among those who yearned for the days of the junta. Capitalizing on his newfound fame, he won the position of city counselor in Rio de Janeiro in 1988, the same year the Constituent Assembly finished the new constitution. In the same election, thanks to the Assemblies of God’s new political strategy, more evangelical candidates were elected at the municipal level than ever before. In the following years, the Assembly of God’s donations to the Christian Social Party (PSC), a new political party that put religion at the front and center of its platform, strengthened and facilitated the church’s political efforts.

By the early 1990s, Brazil’s economy had improved and inflation was down. Yet Bolsonaro couldn’t seem to let go of the dictatorship. As a city counselor and later as a federal deputy, he focused on increasing the benefits, salaries, and pensions of the military. In 1993, he called for the abolition of Congress, and in 1999, was suspended from congress after saying he wished the military had assassinated the current democratically-elected President Fernando Henrique Cardoso. A majority of Brazilians, meanwhile, had no interest in going back to the military years.

While Bolsonaro’s extreme views confined him to the margins, evangelical leaders embraced Brazil’s desire to join the global middle class. By 2003, their emphasis on faith and acts of sacrifice (particularly through tithing) as the path to material wealth, was one of the main reasons why Brazilians joined their churches. Around the same time, Lula, a labor leader during the dictatorship in the outlawed Workers’ Party, had finessed his leftist views into a palatable populist message. With a government flush with cash from rising commodities prices, he pushed massive infrastructure programs and direct cash transfers which eventually brought 36 million Brazilians out of poverty over 10 years. Despite the evangelical community’s suspicions of Lula, most eventually embraced him. Lula reciprocated, bringing them into his governing coalition. Both drew from the same base of support: poor Brazilians who wanted a better life.

But the global recession and a collapse in global commodities prices foiled Lula and his successor, Dilma Rousseff. Operation Carwash, which began in 2014 and uncovered a massive corruption scheme involving Petrobras, politicians, and construction companies, in which billions of dollars were siphoned off from public coffers, outraged Brazilians and signaled the beginning of the end for the Workers’ Party. In May 2016, Brazil’s senate impeached Dilma Rousseff, Lula’s successor, for manipulating the federal budget. With crime and violence skyrocketing, unemployment hitting a record high, and a never-ending slew of political scandals, Brazil spiraled into chaos. In 2016, the police gave up trying to control violent areas of Rio de Janeiro, Bolsonaro’s district, because the government couldn’t pay the police. Some began to wonder if what their country needed was a more disciplined, firmer approach to governing.

In May 2016, the same month Dilma was impeached, Bolsonaro was in Jordan. On May 12, Pastor Everaldo, a prominent leader of the Assembly of God and the head of the Christian Social Party, baptized Bolsonaro in the Jordan River. This was his most important act in formalizing his relationship with Evangelicals that he spent the early part of this decade cultivating. And even though Bolsonaro hasn’t renounced his Catholicism—he calls himself a Catholic who, for 10 years, attended the Baptist church—evangelical leaders like Silas Malafaia are ready to offer him their support as someone who can put the country back on track. Bolsonaro’s wife and son are evangelical, which so far has given him just enough credibility to navigate the evangelical community. With Catholics projected to become a religious minority by 2030, and evangelicals making up 22 percent of the electorate, Bolsonaro has placed his political fortunes in the hands of the evangelicals.

Bolsonaro’s evangelical supporters continue to back him not so much because of his extreme rhetoric, but because they view him as incorruptible. For Carlos Henrique Bernardes, a member of the Baptist church, Brazilians “don’t have options for ‘clean’ candidates, and Bolsonaro seems to be the only one who’s not corrupt, and that’s what makes him so appealing.” Meanwhile, to broaden his appeal, Bolsonaro has toned down some of his more extreme claims. He has connected with segments of the Brazilian population who feel they have been ignored by their elected officials, according to de Souza Junior. “That might be one of Bolsonaro’s greatest strengths,” Bernardes said. That’s what got Lula elected. And Bolsonaro might benefit from it, too.

With crime and corruption rampant, Brazilians find Bolsonaro’s nostalgia for military dictatorship and even his disdain for democracy appealing. And so he’ll continue bringing those fed up, middle-class Brazilians together with conservative Christians sympathetic to a law-and-order governing style.

Lula is likely resort to Brazil’s Supreme Court to challenge the verdict from the court of appeals. At a speech given to his supporters while the judges read their verdicts, he said he’ll stop fighting only when he dies. And his resilience might pay off. For de Souza Junior, “Lula’s voters aren’t sympathizers, they’re loyalists.”

But even if Lula ends up being able to run and wins the presidency, the scandal that will plague his term and the possibility of his impeachment should only further boost Bolsonaro’s long-term support. For de Souza Junior, the “precariousness of Bolsonaro’s platform wouldn’t necessarily deter his victory.” Today, one in three Brazilians would support a military takeover in the country.

In an interview 19 years ago, Bolsonaro said: "You can’t change anything in this country with voting and elections.” It seems that now it is precisely through voting and elections that he’ll try to make his kind of change.

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