RIO DE JANEIRO — Investigators are circling. Supporters are turning their backs. Hundreds in his country are dying each day of a disease he has dismissed as a case of the sniffles. A majority of the people want him gone.

As Latin America’s largest country plunges into its gravest health and economic crises in a generation, Brazilian President Jair Bolsonaro, the man best positioned to buoy a bewildered people, is floundering — hemmed in by scandal, aggrieved by perceived betrayals, unfocused and contradictory in public pronouncements.

His behavior has overlaid the health and economic emergencies with a political crisis, pushing Brazil into a period of extraordinary volatility. Detractors are banging pots from their windows nightly. Two powerful and popular ministers, with the key portfolios of health and justice, have departed his cabinet. One of them, outgoing justice minister Sérgio Moro, accused him of corruption.

Now, as the coronavirus death toll moves past 5,000, the nation’s highest court has authorized a criminal investigation into whether Bolsonaro tried to manipulate the federal police for political gain. Moro, one of Brazil’s most trusted and popular public officials, said Bolsonaro demanded the installation of a police chief who would take his investigation requests and pass along intelligence.

Supreme Federal Court Justice José Celso de Mello Filho ruled Monday that an investigation was necessary. “No one, not even the president, is above the constitution and the law,” he said.

Bolsonaro denies any wrongdoing. Elected 18 months ago with more than 55 percent of the vote, he retains a base of fervent supporters in this deeply divided country. Some of them are now calling on the former army officer to lead a military takeover of the government. But polling shows a majority of Brazilians believe he should be impeached.

The developments underscore just how dramatically the political landscape here has shifted since the arrival of the coronavirus, whose severity Bolsonaro has played down perhaps more than any other major world leader. His response has been a case study in federal inaction, leaving governors and ministers to craft their own public health strategies — which he has then undermined in his speeches and actions.

He has given national addresses demanding businesses reopen. He has barreled into crowds to greet and grasp supporters. Health Minister Luiz Henrique Mandetta publicly contradicted him on the need for social distancing — so he fired him.

“He started to have anti-health attitudes, inciting crowds, hailing a medication that didn’t have any scientific basis,” Mandetta said in his first interview since his dismissal this month. “From that moment, it was difficult as the minister to be held to account during press conferences for this incoherence.”

Bolsonaro, he said, wasn’t listening to him — or anyone else in the Health Ministry.

“He had his own advisers who were making him think that this was a smaller epidemic, that the gravity of it wasn’t so great, that chloroquine would solve everything, that it was a global plot,” Mandetta said. “But I never heard this from anyone in the Ministry of Health or any ministry. Quite the contrary, everyone, even the minister of economy, knew we had to first attend to the health crisis.”

The relationship became untenable — the minister begging people to stay inside, the president urging them to go back outside.

“I don’t think he fired me,” Mandetta said. “He fired science.”

Bolsonaro’s presidential office didn’t return requests for comment.

As the crises have deepened, so has Bolsonaro’s isolation. Former allies have called for his impeachment, and his circle has narrowed to only a few trusted advisers and his adult sons, according to people who know the president.

“He discusses everything with his children,” said one informal adviser, who spoke on the condition of anonymity to discuss the president candidly. “His children have a great influence on his decisions. He only trusts his children, no one else.”

Bolsonaro’s sons surrounded him in a recent video showing the president hailing chloroquine, the unproven, potentially dangerous drug he has ordered mass-produced to fight the coronavirus. They have attacked detractors on social media. And they are themselves the subjects of investigations that have grown into political scandals for Bolsonaro.

Flávio Bolsonaro, a federal senator, has been accused of embezzlement. Investigators have accused Carlos Bolsonaro, a Rio de Janeiro city council member, of leading an online disinformation campaign targeting critics.

The Bolsonaros have denied wrongdoing. The president argued Monday that anything written by Carlos was protected under guarantees of freedom of expression.

Moro’s allegation that Jair Bolsonaro wanted to install a police commander who would grant him access to confidential reports and take investigative requests has ­fueled suspicions that the president was attempting to hamper the investigations into his sons.

Bolsonaro argues that the choice of police commander is his to make. But powerful allies are now criticizing him openly.

“The president caused his own isolation,” said Sen. Sérgio Olímpio Gomes, until recently one of Bolsonaro’s most trusted supporters in the National Congress. “A massive public health crisis, an unprecedented economic crisis, and now this — the minister of justice, who has the highest reputation in Brazil as a corruption-fighting judge, making these accusations against the president. It is very bad for the country.”

The accusations seem to have left Bolsonaro personally aggrieved. “I always opened my heart to” Moro, Bolsonaro said. “And I doubt if he ever opened his for me.”

Some of Brazil’s most prominent voices are calling for Bolsonaro to step down. Former president Fernando Henrique Cardoso, a center-right politician, said Bolsonaro lost his support in his handling of the coronavirus. In his body language, Cardoso said in an interview, Bolsonaro “looked like a Nazi.”

“When he was minimizing the importance of the coronavirus, when he said this was a little flu, it gave the impression that he wasn’t fully there,” Cardoso said. “It’s not a little cold. It kills. It kills many people.”

Cardoso said the political climate in Brazil — barely removed from the 2016 impeachment of President Dilma Rousseff, the imprisoning of her predecessor, Luiz Inácio Lula da Silva, and the prosecution of her successor, Michel Temer — is so volatile that he didn’t think another presidential impeachment would be good for the country. He called on Bolsonaro to resign voluntarily.

The problems the country faces are so grave that even frequent critics of Bolsonaro are urging calm. Congressional leader Rodrigo Maia has said he doesn’t want to discuss impeachment — the legislature’s priority right now should be the coronavirus. “Our role is to have patience,” he said. “Congress, under my leadership, will act with patience and balance so that we can handle what is more important: Brazilian lives.”

Whether Bolsonaro survives politically, analysts said, will be a question of how long the outbreak lasts and how low his popularity sinks. In an irony, a crisis that Bolsonaro has minimized could buy him time to build a new coalition. He’s working to develop new allies in the Congress.

“The president, even though he has a horrible relationship with Congress, is protected from an impeachment gaining steam,” said Claudio Couto, a public policy professor at Fundação Getulio Vargas, a university in Rio de Janeiro. “Congress has more important things to worry about — that’s the paradox we are facing.”

For Rafael da Conceição, a former Bolsonaro supporter in Rio de Janeiro, the paradox was simple.

“I wouldn’t vote for him again,” he said. “He’s always starting political wars — not helping the people.”

Lopes reported from Watercolor, Fla.