RIO DE JANEIRO — In Brazil, when support for the president ends, the attacks begin.

When the anticorruption-crusading justice minister quit this year, criticizing President Jair Bolsonaro on his way out, a tsunami of invective washed over social media, calling him a communist, a traitor, a crook. When the social distance-championing health minister contradicted Bolsonaro on coronavirus containment, claims that he was corrupt went viral. When the congressional president condemned Bolsonaro’s dismissal of the pandemic, a barrage of hashtags labeled him the enemy of Brazil.

It has long been a fact of political life here that virtually anyone who criticizes Bolsonaro — from the powerful to everyday journalists — draws overwhelming and coordinated digital smears. What’s not known is who has been behind the violent and bigoted imagery, the fabricated correspondence, the outright lies.

But now investigators and prominent politicians are charging that some, if not much, of the disinformation is being generated not in the Internet’s nether reaches, but by those closest to Bolsonaro — friendly bloggers, wealthy businessmen, close aides and even his own children. Critics have called it the “office of hate.”

“This is the major machinery of the government,” said Julie Ricard, a researcher at the Harvard Humanitarian Initiative who has studied disinformation in Brazil. “It’s creating a lot of tension because the potential consequences are expected to be big. Bolsonaro and his whole team are aware of it.”

Bolsonaro and his sons have denied the allegations, which they say are politically motivated. But the possibility that Bolsonaro’s closest allies and family members are helming the digital smear campaigns has further roiled the country at a time of a devastating coronavirus outbreak, widespread unemployment and deep political mistrust. Brazilian police last week searched the homes of Bolsonaro allies as part of its investigation of fake news, prompting a threatening outburst by the president.

“I repeat, we will not have another day like yesterday,” he said after the raids. “Enough! We have reached our limit. I have the weapons of democracy in my hands.”

As investigators bear down on Bolsonaro and his allies, Brazilians fear a constitutional crisis. The judicial branch of government has authorized an investigation of whether Bolonsaro improperly manipulated the federal police. The president has said he won’t comply with “absurd” legislative orders that would “plunge Brazil into a political crisis.”

His son Eduardo, who has been accused of spreading fake news, took the rhetoric further. The federal senator, who has wondered publicly whether the military will need to take over the country, warned of a “rupture” and a “broader conflict.”

“It is no longer a question of if,” he said, “but a question of when it will occur.”

Disinformation is a global scourge, having precipitated violence and swayed elections. Now Brazil is tussling over some of its most fundamental questions: how to stop it, and how to hold those responsible to account. After fake news, much of it in support of Bolsonaro, swamped the 2018 presidential election, the national congress convened a panel of 15 senators and 15 representatives to determine how it was influencing the public debate.

The goal, federal senator Ângelo Coronel said, was to “discover the flash points in the industry of fake news that is shaking Brazilian democracy.”

Among the witnesses called to testify was a conservative congressional representative named Joice Hasselmann. She was once one of Bolsonaro’s closest allies, leading his former political party in congress, but the pair had a bitter split. Soon after the rupture, she started seeing distorted images of herself all over the Internet. Claims that she was corrupt, that she was a prostitute and “everything else you could imagine” were everywhere.

“It was my body disfigured,” she said. “There were montages where my face on the body of a pig surrounded by men in pornographic postures.

“My son asked, ‘Mom, why are they doing this?’ ”

She used her connections on the right to infiltrate WhatsApp groups to find out who was behind the attacks, and took what she said she’d learned to lawmakers in December. She said Bolsonaro’s sons were involved in a “criminal organization” bent on destroying people they considered “traitors” with disinformation.

“This doesn’t happen anywhere in the world,” Hasselmann told The Washington Post. “If you weren’t strong, you’d shoot yourself in the head. . . . This isn’t to punish or penalize you. This is to kill you morally.”

The severity of the allegations — coupled with Bolsonaro’s aggressive posturing — is ratcheting up political tensions as the investigation draws near its conclusion. The president’s supporters are massing in the streets each week to call on him to lead a military takeover. Bolsonaro last weekend flew over them in a military helicopter, then mounted a police horse and rode out to greet them. Afterward, one of the members of the supreme court reportedly fretted that Bolsonaro wants to take Brazil where Hitler took Germany.

The investigations have done little to stop the spread of false information. If anything, since the arrival of the coronavirus, it has increased — much of it in support of Bolsonaro’s controversial opinions on the pandemic.

Brazil has reported more than 555,000 cases, second only to the United States, and more than 31,000 deaths. Both figures are widely believed to be undercounts.

Bolsonaro has repeatedly minimized the disease. He’s on his third health minister since the virus hit Brazil, after the first two wouldn’t acquiesce to his demands to treat patients with the anti-malarial drug chloroquine, an unproven remedy that has dangerous side effects.

Now conspiracies are rampant that the pandemic is being exaggerated to make Bolsonaro look bad. That governors who’ve imposed containment measures are communists. That chloroquine is a miracle cure.

“We are in the middle of a pandemic,” said Marcelo Ribeiro Freixo, a leftist politician and frequent critic of Bolsonaro. “But Bolsonaro isn’t talking about that. He isn’t talking about the deaths. If he didn’t have fake news on social media, he wouldn’t survive. He would be defeated.”

Heloísa Traiano contributed to this report.