SAO PAULO (Reuters) - Under attack from all sides, Brazilian President Jair Bolsonaro did what might have been expected of a former army captain - he went on the offensive.
Thousands of Brazilians are dying daily of COVID-19, the economy is struggling and the president's political arch-rival now threatens his 2022 re-election bid. So Bolsonaro shuffled the deck, putting loyalists in key ministerial positions and smoothing relations with capricious allies in Congress.
By making six changes to his Cabinet, the largest shake-up of his presidency so far, Bolsonaro regained the initiative.
The reshuffle began with allies' demands to tone down the far-right rhetoric, including the ouster of anti-China firebrand Ernesto Araujo as top diplomat. But Bolsonaro's main objective, according to political analysts, was gaining greater control over the armed forces and the federal police.
Unexpected shake-ups at the Defense Ministry and the Justice Ministry, which oversees the police, put staunch Bolsonaro supporters in charge.
A Cabinet position handling legislative priorities went to a member of the powerful congressional coalition known as the "centrão," whose support is vital to keeping impeachment at bay.
"Bolsonaro started yesterday morning on the ropes, taking hits from all sides," said Paulo Kramer, a political scientist in Brasilia. "But as the day passed, he turned it around."
Signs of easier relations between Congress and the president helped Brazilian stocks, which hit a one-month high on Tuesday.
For Kramer, Bolsonaro's moves were at their core focused on short-term survival, although next year's election and the prospect of facing leftist former President Luiz Inacio Lula da Silva is never far from the leader's mind.
"He knows the next two months are going to be really tough until the curve flattens," Kramer said, referring to the explosion of cases that has made Brazil the current epicenter of the coronavirus pandemic. The country trails only the United States in total COVID-19 deaths and cases.
So far, Bolsonaro has held on to his core support of about 30% in opinion polls. But his rejection rates continue to climb and, if epidemiologists are right, the worst of Brazil's COVID-19 outbreak is still to come.
It was too early, Brasilia watchers said, to know if the high-stakes gambit would work. The military, in particular, is a complex organization not easily swayed by a single appointment.
On Tuesday, the Defense Ministry said it would also replace all three commanders of the armed forces, but did not provide details of who would be appointed in their place.
Their departures add to evidence that the coalition that got Bolsonaro elected appears to be fracturing.
"I think President Bolsonaro is at a moment of great isolation," said Leonardo Barreto, director at political consultancy Vector in Brasilia.
After cheering Bolsonaro's promises of free-market reforms, Brazil's business elite is frustrated by a stalled agenda of privatizations and political interventions at state lender Banco do Brasil and oil producer Petrobras.
Military officers, some of whom took key roles in the administration, are increasingly concerned their reputation is being tarnished by the government's missteps. Far-right ideologues are also losing space in Bolsonaro's Cabinet after the exit of Araujo and an earlier housecleaning at the Education Ministry.
"He realized he had people around him who wouldn't do everything he wanted," Rafael Alcadipani, professor at business school Fundação Getulio Vargas, said of Bolsonaro.
"He is getting himself organized, both with the armed forces and the police through the Justice Ministry, to have a group that is more loyal to him."
(Reporting by Stephen Eisenhammer and Eduardo Simoes; Additional reporting by Paula Laier; Editing by Brad Haynes and Peter Cooney)