RIO DE JANEIRO — The group chat on WhatsApp was a sort of digital locker room for dozens of Brazil’s biggest businessmen. There was a shopping mall tycoon, a surf wear founder and Brazil’s big-box-store billionaire. They complained about inflation, sent memes and, sometimes, shared inflammatory opinions.
“I prefer a coup to the return of the Workers’ Party,” Jose Koury, another mall owner, said on July 31, referring to the leftist party leading the polls in next week’s presidential election. A restaurant chain owner responded with a GIF of a man applauding.
Given Brazil’s history with dictators and the widespread fears that President Jair Bolsonaro will refuse to accept an election loss, it was a worrisome comment.
But what followed was perhaps even more alarming for the world’s fourth-largest democracy.
Federal agents raided the homes of eight of the businessmen. The authorities froze their bank accounts, subpoenaed their financial, phone and digital records, and told social networks to suspend some of their accounts.
The order came from one Supreme Court judge, Alexandre de Moraes. The only evidence it cited was the WhatsApp group messages, which had been leaked to a journalist. In those messages, only two of the eight businessmen had suggested they supported a coup.
It was a raw display of judicial force that crowned a trend years in the making: Brazil’s Supreme Court has drastically expanded its power to counter the antidemocratic stances of Mr. Bolsonaro and his supporters.
In the process, according to experts in law and government, the court has taken its own repressive turn.
Mr. Moraes has jailed five people without a trial for posts on social media that he said attacked Brazil’s institutions. He has also ordered social networks to remove thousands of posts and videos with little room for appeal. And this year, 10 of the court’s 11 justices sentenced a congressman to nearly nine years in prison for making what they said were threats against them in a livestream.
The power grab by the nation’s highest court, legal experts say, has undermined a key democratic institution in Latin America’s biggest country as voters prepare to pick a president on Oct. 2. Luiz Inácio Lula da Silva, a leftist former president, has led Mr. Bolsonaro in polls for months, while Mr. Bolsonaro has been telling the country, without any evidence, that his rivals are trying to rig the vote.
In many cases, Mr. Moraes has acted unilaterally, emboldened by new powers the court granted itself in 2019 that allow it to, in effect, act as an investigator, prosecutor and judge all at once in some cases.
Dias Toffoli, the Supreme Court justice who created those powers, said in a statement that he did so to protect the nation’s democracy: “Brazil lives with the same incitement to hatred that took lives in the U.S. Capitol invasion, and democratic institutions must do everything possible to avoid scenarios like Jan. 6, 2021, which shocked the world.”
Political leaders on the left and much of the Brazilian press and public have largely supported Mr. Moraes’s actions as necessary measures to counter the singular threat posed by Mr. Bolsonaro.
But many legal experts say that Mr. Moraes’s shows of force, under the banner of saving democracy, are themselves threatening to push the country toward an antidemocratic slide.
“It’s the story of all bad stuff that ever happens in politics,” said Luciano da Ros, a Brazilian political science professor who studies the politics of the judiciary. “In the beginning you had one problem. Now you have two.”
Mr. Moraes declined to comment through a spokeswoman.
The court’s expanding influence could have major implications for the winner of the presidential vote. If Mr. Bolsonaro wins a second term, he has suggested that he would seek to pack the Supreme Court, giving him even more control over Brazilian society.
If Mr. da Silva wins, he would have to contend with justices who could complicate his agenda for a country facing a host of challenges, including rising hunger, deforestation in the Amazon and deep polarization.
“Historically, when the court has given itself new power, it hasn’t said later that it was wrong,” said Diego Werneck, a Brazilian law professor who studies the court. “The powers that get created remain.”
If no candidate receives more than 50 percent of the vote in the Oct. 2 election, the top two finishers will face a runoff on Oct. 30.
Brazil’s Supreme Court was already a potent institution. In the United States, the Supreme Court weighs in on 100 to 150 cases a year. In Brazil, the 11 justices and the attorneys who work for them issued 505,000 rulings over the past five years.
In 2019, a few months after Mr. Bolsonaro took office, a one-page document vastly expanded the Supreme Court’s authority.
At the time, the court was facing attacks online from some of Mr. Bolsonaro’s supporters. Typically, law enforcement officers or prosecutors would have to open an investigation into such activity, but they had not.
So Mr. Toffoli, the court’s chief justice, issued an order granting the Supreme Court itself the authority to open an investigation.
The court would investigate “fake news” — Mr. Toffoli used the term in English — that attacked “the honorability” of the court and its justices.
It was an unprecedented role, turning the court in some cases into the accuser and the judge, according to Marco Aurélio Mello, a former Supreme Court justice who last year reached the mandatory retirement age of 75.
Mr. Mello, who is a supporter of Mr. Bolsonaro, believed the court was violating the Constitution to address a problem. “In law, the means justify the ends,” he added. “Not the reverse.”
Antonio Cezar Peluso, another former Supreme Court justice, disagreed. The authorities, he said, were allowing threats to proliferate. “I can’t expect the court to be quiet,” he said. “It had to act.”
To run the investigation, Mr. Toffoli tapped Mr. Moraes, 53, an intense former federal justice minister and constitutional law professor who had joined the court in 2017.
In his first action, Mr. Moraes ordered a Brazilian magazine, Crusoé, to remove an online article that showed links between Mr. Toffoli and a corruption investigation. Mr. Moraes called it “fake news.”
Andre Marsiglia, a lawyer who represented Crusoé, said the ruling was startling. The Supreme Court had often protected news organizations from lower-court decisions ordering such takedowns. Now it “was the driver of the censorship,” he said. “We had no one to turn to.”
Mr. Moraes later lifted the order after legal documents proved the article was accurate.
Over time, Mr. Moraes opened new investigations and reframed his work around protecting Brazil’s democracy. Mr. Bolsonaro was increasing attacks on judges, the media and the nation’s electoral system.
Mr. Moraes ordered major social networks to remove dozens of accounts, erasing thousands of their posts, often without giving a reason, according to a tech company official who spoke on the condition of anonymity to avoid provoking the judge. When this official’s tech company reviewed the posts and accounts that Mr. Moraes ordered it to remove, the company found that much of the content did not break its rules, the official said.
In many cases, Mr. Moraes went after right-wing influencers who spread misleading or false information. But he also went after people on the left. When the official account of a Brazilian communist party tweeted that Mr. Moraes was a “skinhead” and that the Supreme Court should be dissolved, Mr. Moraes ordered tech companies to ban all of the party’s accounts, including a YouTube channel with more than 110,000 subscribers. The companies complied.
Mr. Moraes went even further. In seven cases, he ordered the arrest of far-right activists on charges of threatening democracy by advocating for a coup or calling people to antidemocratic rallies. At least two are still in jail or under house arrest. Some cases were initiated by the attorney general’s office, while others Mr. Moraes began himself.
In its investigation, the court discovered evidence that far-right extremists had discussed assaulting justices, were tracking the judges’ movements and had shared a map of a court building, according to a court official who spoke on the condition of anonymity because the findings are part a sealed investigation.
In the most high-profile case, Mr. Moraes ordered the arrest of a conservative congressman after he criticized Mr. Moraes and other justices in an online livestream. “So many times I’ve imagined you taking a beating on the street,” the congressman, Daniel Silveira, said in the livestream. “What are you going to say? That I’m inciting violence?”
The Supreme Court voted 10-to-1 to sentence Mr. Silveira to nearly nine years in prison for inciting a coup. Mr. Bolsonaro pardoned him the next day.
With a majority of Congress, the military and the executive branch backing the president, Mr. Moraes has become arguably the most effective check on Mr. Bolsonaro’s power. That has made him a hero to the left — and public enemy No. 1 on the right.
Mr. Bolsonaro has railed against him in speeches, tried and failed to get him impeached and then told supporters he would not abide by Mr. Moraes’s rulings. (He later walked that back.)
Last month, Mr. Moraes took on even more power, also assuming the presidency of the elections court that will oversee the vote. (The timing was a coincidence.)
At his inauguration, Mr. Moraes seemed to speak directly to Mr. Bolsonaro, who sat nearby. “Freedom of expression is not freedom to destroy democracy, to destroy institutions,” Mr. Moraes said as Mr. Bolsonaro scowled.
The tension between the men grew with the WhatsApp case involving the businessmen.
Mr. Bolsonaro blasted Mr. Moraes’s order, which in part approved a police request to search the men’s homes. In an unusual moment, the mainstream Brazilian press agreed with the president. “Exchanging messages, mere opinions without action, even if they are against democracy,” the TV network Band said in an editorial, “does not constitute crimes.”
Under criticism, Mr. Moraes’s office produced an additional legal document that it said provided further evidence of the potential threat the men represented. The document repeated already public connections some of the men had to right-wing operatives.
Mr. Moraes later unfroze the businessmen’s bank accounts. The men were never arrested.
Luciano Hang, the box-store billionaire, said he was fighting to regain control of his social media accounts, which collectively had at least 6 million followers. “We feel violated to have the federal police show up at 6 a.m. wanting to take your phone,” he said.
Lindora Araújo, Brazil’s deputy attorney general and a career prosecutor, appealed Mr. Moraes’s order against the businessmen, saying the judge had abused his power by targeting them for simply stating opinions in a private chat. His order resembled “a kind of thought police that is characteristic of authoritarian regimes,” she said.
That appeal went to Mr. Moraes. He dismissed it.
Lis Moriconi contributed reporting.