RIO DE JANEIRO — For more than a year, President Jair Bolsonaro of Brazil had warned that he might not accept a loss in last month’s presidential election. Then he lost. In response, he reluctantly agreed to begin the transition of power — while his allies inspected the election results for evidence of anything amiss.
This week, his campaign claimed to have found it: a small software bug in the voting machines. On Tuesday, the campaign filed a request to effectively overturn the election in Mr. Bolsonaro’s favor, saying the bug should nullify votes from about 60 percent of the voting machines.
Of the remaining votes, Mr. Bolsonaro would win 51 percent, the campaign said, making him the victor instead of the leftist former president who defeated him, Luiz Inácio Lula da Silva.
The request was a Hail Mary. Independent experts said the bug had no impact on the integrity of the vote. And then, late Wednesday, Brazil’s elections chief dismissed the complaint and fined the three conservative parties behind it $4.3 million for filing it.
Alexandre de Moraes, a Supreme Court justice who runs Brazil’s electoral agency and who has become one of Mr. Bolsonaro’s most prominent political adversaries, said in a decision Wednesday night that the campaign’s arguments were “absolutely false” and that the request to overturn the election was “ostensibly an attack on the democratic rule of law and carried out recklessly, with the aim of encouraging criminal and anti-democratic movements.”
Mr. Moraes had previously given the campaign 24 hours to explain why it had only questioned votes from the election’s second round, in which Mr. Bolsonaro lost, and not the first round, in which his political party won the most seats in Congress using the same voting machines. After the head of Mr. Bolsonaro’s party said on Wednesday that it lacked information about the first round, Mr. Moraes dismissed the complaint.
Mr. Moraes, the elections chief, has become one of Brazil’s most powerful political figures in the face of criticism of the elections system from Mr. Bolsonaro and his allies. Mr. Moraes’s aggressive response to what he has called attacks against Brazil’s democracy, including his orders for social networks to take down thousands of posts, has drawn widespread criticism from the Brazilian right.
On short notice on Wednesday afternoon, hours before Mr. Moraes’s decision, Mr. Bolsonaro’s right-wing Liberal Party had called reporters to a hotel in Brasília, the nation’s capital, to explain its findings.
Valdemar Costa Neto, the party’s president, said the software bug demanded a review of the election results. “There can’t be any doubts about the vote,” he said. “If this is a stain on our democracy, we have to solve it now.”
Mr. Moraes on Wednesday also ordered an investigation into Mr. Costa Neto and the official who oversaw the party’s audit.
The software bug highlighted by Mr. Bolsonaro’s campaign causes an error in one document produced by some older voting machines. The error affects the identification number connected to the voting machine. Liberal Party officials argued that made it difficult to verify the votes.
Independent computer security experts who have studied Brazil’s voting machines and who reviewed the campaign’s findings said that was wrong. They said that while the bug exists, it has no bearing on the integrity of the results. That is because there are a variety of other ways to identify the voting machines, including on the very documents that have the error.
“They pointed out a bug that needs to be corrected. That’s great, and it’s actually easy to correct,” said Marcos Simplício, a cybersecurity researcher at the University of São Paulo. But he said that the campaign’s suggestion that votes should be nullified is like arguing a car is totaled because of a scratch on the door.
“Try to convince your insurance company of that,” he said. “It’s nonsense. Complete nonsense.”