RIO DE JANEIRO — President Jair Bolsonaro of Brazil has for months consistently trailed in the polls ahead of the country’s crucial presidential race. And for months, he has consistently questioned its voting systems, warning that if he loses October’s election, it will most likely be thanks to a stolen vote.
Those claims were largely regarded as talk. But now, Mr. Bolsonaro has enlisted a new ally in his fight against the electoral process: the nation’s military.
The leaders of Brazil’s armed forces have suddenly begun raising similar doubts about the integrity of the elections, despite little evidence of past fraud, ratcheting up already high tensions over the stability of Latin America’s largest democracy and rattling a nation that suffered under a military dictatorship from 1964 to 1985.
Military leaders have identified for election officials what they say are a number of vulnerabilities in the voting systems. They were given a spot on a transparency committee that election officials created to ease fears that Mr. Bolsonaro had stirred up about the vote. And Mr. Bolsonaro, a former army captain who filled his cabinet with generals, has suggested that on Election Day, the military should conduct its own parallel count.
Mr. Bolsonaro, who has spoken fondly about the dictatorship, has also sought to make clear that the military answers to him.
Election officials “invited the armed forces to participate in the electoral process,” Mr. Bolsonaro said recently, referring to the transparency committee. “Did they forget that the supreme chief of the armed forces is named Jair Messias Bolsonaro?”
Almir Garnier Santos, the commander of the Brazilian Navy, told reporters last month that he backed Mr. Bolsonaro’s view. “The president of the republic is my boss, he is my commander, he has the right to say whatever he wants,” Mr. Garnier Santos said.
With just over four months until one of the most consequential votes in Latin America in years, a high-stakes clash is forming. On one side, the president, some military leaders and many right-wing voters argue that the election is open to fraud. On the other, politicians, judges, foreign diplomats and journalists are ringing the alarm that Mr. Bolsonaro is setting the stage for an attempted coup.
Mr. Bolsonaro has added to the tension, saying that his concerns about the election’s integrity may lead him to dispute the outcome. “A new class of thieves has emerged who want to steal our freedom,” he said in a speech this month. “If necessary, we will go to war.”
Edson Fachin, a Supreme Court judge and Brazil’s top election official, said in an interview that claims of an unsafe election were unfounded and dangerous. “These problems are artificially created by those who want to destroy the Brazilian democracy,” he said. “What is at stake in Brazil is not just an electronic voting machine. What is at stake is maintaining democracy.”
Mr. Bolsonaro and the military say they are only trying to safeguard the vote. “For the love of God, no one is engaging in undemocratic acts,” Mr. Bolsonaro said recently. “A clean, transparent, safe election is a matter of national security. No one wants to have doubts when the election is over.”
Brazil’s Defense Ministry said in a statement that “the Brazilian armed forces act in strict obedience to the law and the Constitution, and are directed to defend the homeland, guarantee the constitutional powers and, through any of these, of law and order.”
Mr. Bolsonaro’s tactics appear to be adopted from former President Donald J. Trump’s playbook, and Mr. Trump and his allies have worked to support Mr. Bolsonaro’s fraud claims. The two men reflect a broader democratic backsliding unfolding across the world.
The riot last year at the U.S. Capitol has shown that peaceful transfers of power are no longer guaranteed even in mature democracies. In Brazil, where democratic institutions are far younger, the military’s involvement in the election is heightening fears.
Mr. Garnier Santos told the Brazilian newspaper O Povo that “as a navy commander, I want Brazilians to be sure that their vote will count,” adding, “The more auditing, the better for Brazil.”
A Brazilian federal police report detailed how two generals in Mr. Bolsonaro’s cabinet, including his national security adviser, had tried for years to help him uncover evidence of election fraud.
And on Friday, Brazil’s defense minister, Paulo Sérgio Nogueira, sent a 21-point missive to election officials, criticizing them as not taking the military’s points about election safety seriously. “The armed forces don’t feel properly acknowledged,” he said.
So far, Mr. Bolsonaro’s comments have gone further. In April, he repeated a falsehood that officials count votes in a “secret room.” He then suggested that voting data should be fed to a room “where the armed forces also have a computer to count the votes.” The military has not publicly commented on this idea.
Since the military’s support could be critical for a coup, a popular question in political circles has become: If Mr. Bolsonaro disputed the election, how would the 340,000 members of the armed forces react?
“In the U.S., the military and the police respected the law, they defended the Constitution,” said Mauricio Santoro, a professor of international relations at the State University of Rio de Janeiro, referring to Mr. Trump’s claims of a stolen election. “I’m not sure the same thing will happen here.”
Military officials and many politicians dispute any notion that the military would back a coup. “He would fall. He wouldn’t have any support,” said Maynard Santa Rosa, a Brazilian Army general for 49 years who served in Mr. Bolsonaro’s cabinet. “And I think he knows it.”
Sérgio Etchegoyen, a retired army general close to the military’s current leaders, called concerns about a coup alarmist. “We might think it’s bad that the president questions the ballots,” he said. “But it’s much worse if every five minutes we think the democracy is at risk.”
Some American officials are more concerned about the roughly half-million police officers across Brazil because they are generally less professional and more supportive of Mr. Bolsonaro than the military, according to a State Department official who spoke on the condition of anonymity to discuss private conversations.
Any claim of a stolen election could face a skeptical public unless the race tightens. A survey of 2,556 Brazilians in late May showed that 48 percent supported former President Luiz Inácio Lula da Silva, compared with 27 percent for Mr. Bolsonaro. (If no candidate captures half of the vote, the top two finishers will go to a runoff on Oct. 30.)
That same poll showed that 24 percent of respondents did not trust Brazil’s voting machines, up from 17 percent in March. Fifty-five percent of respondents said they believed the election was vulnerable to fraud, including 81 percent of Mr. Bolsonaro’s supporters.
In the 37 years of Brazil’s modern democracy, no president has been as close to the military as Mr. Bolsonaro, a former army paratrooper.
As a congressman, he hung portraits of the leaders of the military dictatorship in his office. As president, he has tripled the number of military personnel in civilian posts in the federal government to nearly 1,100. His vice president is also a former general.
Last year, as he intensified his critiques of the electoral system, he dismissed the defense minister and the top three military commanders, installing loyalists in their places.
The new defense minister quickly weighed in on the electoral process, backing Mr. Bolsonaro’s push to use printed ballots in addition to voting machines, which would make recounts easier. Brazil is one of the few countries to rely entirely on electronic voting machines — 577,125 of them.
While Mr. Bolsonaro and his allies admit that they lack proof of past fraud, they point to a number of problems: some perceived irregularities in voting returns; a 2018 hack of the electoral court’s computers, which do not connect to the voting machines; and election officials’ general dismissal of concerns.
Diego Aranha, a Brazilian computer scientist who has tried to hack the machines for research, said that the lack of paper backups makes it harder to verify results, but that the system overall was safe.
Brazil’s Supreme Court ultimately rejected the use of printed ballots, citing privacy concerns.
Last year, when election officials created the “election transparency commission,” they invited an admiral with a computer science degree to join. Brazil’s defense minister instead sent a general who directs the army cybercommand.
The army representative sent four letters to election officials with detailed questions about the voting process, as well as some recommended changes.
He asked about the machines’ tamper-proof seals, the computer code that underpins them and the biometric technology used to verify voters. Election officials said on Saturday that they would accept some of the small technical recommendations and study others for the next election but that other suggestions misunderstood the system.
Amid the back-and-forth, the former head of the electoral court, Luís Roberto Barroso, told reporters that military leaders were “being guided to attack the Brazilian electoral process,” an assertion that Mr. Nogueira, the defense minister, called “irresponsible.”
The electoral court also invited European officials to observe the election, but rescinded the invitation after the Bolsonaro administration objected. Instead, Mr. Bolsonaro’s political party is trying to have an outside company audit the voting systems before the election.
Mr. Fachin, who now runs the electoral court, said Mr. Bolsonaro was welcome to conduct his own review but added that officials already test the machines. “This is more or less like picking the lock on an open door,” he said.
The Biden administration has warned Mr. Bolsonaro to respect the democratic process. On Thursday, at the Summit of the Americas in Los Angeles, President Biden met with Mr. Bolsonaro for the first time. Sitting next to Mr. Biden, Mr. Bolsonaro said he would eventually leave office in “a democratic way,” adding that October’s election must be “clean, reliable and auditable.”
Scott Hamilton, the United States’ top diplomat in Rio de Janeiro until last year, wrote in the Brazilian newspaper O Globo that Mr. Bolsonaro’s “intent is clear and dangerous: undermine the public’s faith and set the stage for refusing to accept the results.”
Mr. Bolsonaro insists that he is simply trying to ensure an accurate vote.
“How do I want a coup if I’m already president?” he asked last month. “In Banana Republics, we see leaders conspiring to stay in power, co-opting parts of the government to defraud elections. Here it’s exactly the opposite.”
André Spigariol contributed reporting from Brasília, and Leonardo Coelho from Rio de Janeiro.
André Spigariol contributed reporting from Brasília and Leonardo Coelho from Rio de Janeiro.