Tens of thousands of Brazilians held nationwide protests late on Thursday in support of President Dilma Rousseff, defying what they call a coup attempt.
The rallies were part of a concerted attempt by Rousseff to turn the tide ahead of an impeachment vote over her alleged manipulation of government accounts to disguise the depth of Brazil's recession during her 2014 reelection.
Further boosting Rousseff, her chief ally in the spiraling political crisis - fiery ex-president Luiz Inacio Lula da Silva - won a major court battle that removes him from the jurisdiction of a crusading anti-corruption judge.
The peaceful demonstrators, many waving the red flags of Rousseff's Workers' Party, gathered in 31 cities, including Brasilia, Rio de Janeiro, Sao Paulo and northern centers like Recife.
The Globo news site quoted police estimates for a total turnout of more than 110,000, while the organisers claimed nearly 600,000 turned out. Police told Agence France Presse that at least 25,000 to 30,000 people marched at one of the larger rallies in Brasilia.
"No to the coup," said one placard popular at the protests. "Democracy," read a large banner at the gathering in Rio, where more than 5,000 people turned out across the city some four months ahead of the 2016 Olympics.
In Sao Paulo, Brazil's financial powerhouse, Francisco Ranieri, 50, said he had taken to the streets "because now is the moment."
"The opposition wants to push Dilma from power to end the people's government," added Ranieri, a shopkeeper.
"Dilma is the victim of a coup," said another demonstrator, teacher Ana Cristina Bentes, 52.
Lula, the hugely influential founder of the Workers' Party and pillar of Brazil's left had been due to lead the Brasilia rally but cancelled at the last minute. His spokesman did not explain the change in plan.
Just as protesters gathered, Lula won a significant court victory that could help boost Rousseff's cause.
Rousseff has been counting on the well-connected ex-president to lead the fight against impeachment in Congress and reorganise her flailing administration after the main coalition to the Workers' Party quit earlier this week.
But the leftist heavyweight's comeback has been derailed by corruption charges linked to a sprawling probe led by federal Judge Sergio Moro into a bribes and embezzlement scheme at state oil company Petrobras.
On Thursday, the Supreme Court issued an interim ruling removing the politically explosive case from Moro and putting it with the high court - a decision expected to give Lula considerable breathing space.
It was a rare victory for Rousseff whose chances of defeating impeachment are thought to have nosedived since the collapse of her coalition.
She vigorously dismissed the impeachment drive as a trumped up campaign and on Thursday told a group of artists and academics that the accounting tricks she is accused of using illegally have always been accepted.
"If I suffer impeachment, then it means that every previous government should have been impeached too, because all of them, without exception, did the same thing," she said. "I was always respecting the law."
Battle for Votes
Congress's preliminary impeachment commission is expected to begin deliberations next Tuesday before making a recommendation mid-April.
Its recommendation is non-binding but will set the tone for a vote shortly after by the lower house, where 342 votes out of 513, or two thirds, are needed to launch an impeachment trial in the Senate.
If Rousseff manages to get more than 171 votes she would defeat the measure, but impeachment could also fail through abstentions or deputies not attending so that the 342 figure is not reached.
Until only recently Rousseff seemed likely to narrowly prevail, despite her unpopularity and the intense hostility of opponents in the increasingly divided country.
But the exit this week of the centrist PMDB from her coalition left her congressional support in tatters.
Loyalists are putting on a brave face, insisting that they can cobble together a new coalition and also target individual congressional deputies, regardless of their party's affiliation.
With seven ministries that had been held by the PMDB and some 580 other posts to hand out, the government hopes it will be able to horse-trade for support.