Days ahead of Brazil's October 2 presidential election, the country is facing the most serious challenge to its democracy since its inception 37 years ago. President Jair Bolsonaro, a former army captain, triumphed in 2018 amid a wave of anti-establishment sentiment but is now trailing in the polls in his showdown against former President Luiz Inácio da Silva, or Lula, as he is universally known. Confronted with probable defeat, Bolsonaro has made unsubstantiated claims about voter fraud and publicly insists that the only way the opposition can prevent him from winning a second term is by stealing the election. His rhetoric is finding favor among his supporters: of the roughly 50 million Brazilians who say they will vote for Bolsonaro, about one-quarter are so radicalized that they have told pollsters the president should not recognize the result if he loses.

To make matters worse, the leadership of Brazil's military—an institution that has accumulated significant political power during Bolsonaro’s tenure—has failed to condemn the president's antidemocratic rhetoric. Indeed, Defense Minister Paulo Sérgio Nogueira has gone so far as to back Bolsonaro's proposal that the military conduct a parallel count of the votes despite the fact that such an undertaking would run counter to the rule of law and could set the country up for a constitutional crisis.

The first round of voting will take place on Sunday. Eleven candidates are running, which makes it possible that neither Bolsonaro nor Lula will win at least 50 percent of the vote. If that happens, a runoff will occur on October 30. If Bolsonaro loses and refuses to concede, Brazil faces three possible scenarios. The president could insist that the election was stolen but refrain from attempting to stop the transition. Bolsonaro could take a page from his political idol, former U.S. President Donald Trump, and attempt to create a “Brazilian January 6th”—that is, he could incite mayhem that nonetheless stops short of impeding a democratic transition. In the worst case, his supporters could engage in political violence and the armed forces could fail to protect democracy, impeding a normal transition.

The U.S. government, to its credit, has proactively tried to stave off a post-election crisis in Brazil. The chief public emissary in this effort has been U.S. Secretary of Defense Lloyd Austin. It was a canny move to use Austin in this capacity because the relationship between U.S. President Joe Biden and Bolsonaro is, to put it mildly, not close. Bolsonaro was one of the last leaders in the world to congratulate Biden after he won the U.S. presidency. Indeed, as an avowed Trumpist, Bolsonaro has frequently suggested that the 2020 U.S. presidential election was stolen.

MILITARY MIGHT

Bolsonaro has expressed nostalgia for the military dictatorship that ruled Brazil from 1964 to 1985. At one point, around a third of Bolsonaro’s cabinet was composed of retired or active-duty military officers. During his tenure, current or former members of the armed forces have led the Ministries of Infrastructure, Mines and Energy, and Defense; played a key role in the government’s controversial response to the COVID-19 pandemic; helped spearhead the failed attempt to combat deforestation in the Amazon; and weighed in on relations with countries such as China. In the process, they have accumulated tremendous political influence and overseen sizable chunks of the federal budget.

This is not to say that the military is in Bolsonaro’s pocket. The vast majority of Brazil’s generals would readily and publicly commit to protecting democracy. But that might not prevent the president from interfering with the democratic process.

The primary way Bolsonaro and his allies have laid the groundwork for subverting the election is by raising questions about Brazil’s electronic voting system, which experts say is both modern and safe. In particular, Bolsonaro has asserted that the Brazilian Supreme Court is preventing the implementation of poorly defined additional safeguards that supposedly would prevent fraud. The solution, Bolsonaro says, is to have Brazil’s military oversee the election, although there is no constitutional mandate for the armed forces to do so. Nor do military officials have the expertise for such an endeavor. In August, Defense Minister Nogueira, who is also a general, made an “urgent” request to the Superior Electoral Tribunal in which he revealed his ignorance about basic aspects of the country’s computerized elections system. After all, the data the defense minister demanded, including the source code of voting machines, has been available since October 2021.

In July, during a meeting with Austin, Nogueira assured the U.S. secretary of defense that the armed forces would help guarantee a safe and secure election. But that is not the same as an ironclad promise to respect the will of Brazilian voters. The Biden administration should press Nogueira and other military leaders to go beyond making vague commitments to protecting democracy and instead press them to declare that they will respect the Brazil’s Superior Electoral Court’s announcement about the outcome of the election, no matter who wins.

The U.S. government should make clear that if Brazil’s generals interfere in the electoral process, it would lead to a significant downgrade of security cooperation. This could include removing Brazil’s status as a major non-NATO ally—a designation the country obtained under Trump in 2019—and limiting intelligence sharing between the two countries’ armed forces. In addition, the State Department should coordinate with Western allies and collectively recognize the election’s result immediately upon the announcement of the Superior Electoral Court. This would signal to the armed forces that questioning the result would lead to isolation in the West. This diplomatic effort can include carrots as well as sticks: U.S. policymakers should impress upon Brazilian generals that acceptance of the result would allow security cooperation between the two countries to progress even further.

Members of the Brazilian political establishment have admirably done their part to safeguard the integrity of their country’s elections by forging a pro-democracy coalition. Rivals such as the environmentalist and former presidential candidate Marina Silva; the fiscal conservative and former central bank president Henrique Meirelles; and even numerous politicians who supported the impeachment of Dilma Rousseff, Lula’s handpicked successor as president, have put aside deep-seated personal animosities and publicly supported Lula’s candidacy. In a wise decision meant to assuage fears of centrists and center-right voters, Lula chose as his running mate the former governor of São Paulo, Geraldo Alckmin, a socially conservative centrist and onetime rival. In a country where impeachments are not uncommon, this was an important gesture: should Congress find Lula too radical, his backup looks to be a safe pair of hands. Alckmin, a devout Catholic, has relentlessly sought to court conservative voters, evangelicals, agrobusiness leaders, and the military. With the exception of the latter group, he appears to have been relatively successful.

THE KNOWN UNKNOWNS

Despite these efforts, things could go awry on October 2. In the extremely polarized environment that exists in Brazil today, even small incidents may lead to significant instability. A sophisticated deepfake video about supposedly malfunctioning voting machines, a delay in the announcement of the results, or an instance of violence on the day of the election could all interfere in the democratic process. Consider what happened during Bolivia’s elections in 2019: allegations of voting irregularities sparked street protests, which ultimately led the country's armed forces to force President Evo Morales, then up for reelection, to resign. This in turn led to a prolonged period of political turmoil.

The unfortunate similarities between Trump’s attempts to subvert the 2020 U.S. election and Bolsonaro’s efforts to undermine democracy have an upside: they have created an opportunity for the governments of Brazil and the United States to work together to protect democracy in the future. Both countries need to make advances in the war against fake news, which is profoundly corrosive to democracy. In the same way, the run-up to the Brazilian election has shone a light on how Latin American countries must work toward establishing norms to limit the role of the military and police forces in governance.

Although extreme polarization and the events of January 6, 2021, have tarnished the United States’ image all over the world, the country still serves as a powerful role model in one key aspect: at the height of the worst political crisis in more than a century, there was never any doubt that the U.S. military would support the country’s democracy.