There is no relief to be had for Brazil's wounded economy, its hamstrung government or its nerve-racked citizens, not yet. The country's political crisis has grown even more complex, and thus more uncertain, over the past few days, as the ruling Workers' Party scrambles to cut deals that might stave off the impeachment of President Dilma Rousseff. The forming and dissolving of alliances this past week further clouded Ms. Rousseff's prospects.

On Tuesday, the largest party in Ms. Rousseff's coalition, the Brazilian Democratic Movement Party (PMDB), announced it would leave government – and at first, that seemed to make it impossible for the President to survive an impeachment vote.

But then it became clear that the bulky and geographically fractured PMDB, as it is known by its Portuguese acronym, was not unanimous – some cabinet ministers and their allies stayed with Ms. Rousseff (at least for now). At the same time, Ms. Rousseff and her predecessor as president, Luiz Inacio Lula da Silva, a storied deal maker whom the President recently managed to bring into her government, were wooing small parties to support her – offering them ministries and other perks.

Story continues below advertisement

"Dilma is trying to take advantage of the divisions within the PMDB," said Andre Borges, a professor of political science at the University of Brasilia, but he added that he doubts she can succeed, because the smaller parties likely feel they could get better perks in a post-impeachment government.

Ms. Rousseff needs 171 votes in Congress to block the impeachment, which is slated to be decided on April 17.

Ms. Rousseff is technically facing impeachment over allegations of misusing state bank funds to cover budget shortfalls. Her opponents have seized on that relatively slim charge to try to oust her at a time when she is already weakened by the massive corruption scandal known by its police code name, Lava Jato.

Mr. da Silva faces charges of money-laundering in connection with that case (he denies the allegations) and he and Ms. Rousseff won a small victory on Thursday, when the Supreme Federal Tribunal ruled that his case should, for the time being, be assessed at that level rather than by the crusading anti-corruption federal court judge Sergio Moro.

The increased prospect that the President might be impeached seems to have galvanized her base – demonstrations were held in support of the government in 75 cities on Thursday. The day was the 52nd anniversary of the military coup, and protesters chanted "golpe nunca mais" – never another coup. Ms. Rousseff's supporters claim a democratically elected president is being forced from office on a pretext that will bring the defeated opposition into power, and so they call it a coup by another name. Ms. Rousseff is almost universally unpopular, but the Workers' Party, and Mr. da Silva in particular, retain a strong segment of support among Brazil's poor and some of the 36 million people who moved out of poverty thanks to social welfare policies implemented during 13 years of rule by the party.

Ms. Rousseff came out swinging this week. "My impeachment, based on this [the financial juggling], would mean every government before me would have to have suffered the impeachment, because all of them, without exception, did the same thing I did, always with legal backing," she said at an event on Thursday.

Ms. Rousseff, a former Marxist guerrilla who was imprisoned and tortured during the country's dictatorship, has said repeatedly she has no intention of resigning.

Story continues below advertisement

However, she cannot govern – even as Brazil faces its sharpest economic contraction in the past 100 years. The economy shrank by 3.8 per cent last year. Ms. Rousseff, after trying to subsidize and spend her way out of the recession, reluctantly adopted an austerity program late last year. But she has not been able to get her opponents in Congress to pass it, and the currency and investment have tanked.

This week, the major business and industrial lobby groups plastered the media with advertisements demanding her impeachment, and Tuesday's news that she had lost the PMDB's support sent the stock market briefly soaring. Unemployment continues to rise, and it is becoming increasingly clear that the group suffering most is the middle class created in the past decade, with the bulk of job losses in the blue- and pink-collar sectors.

Ms. Rousseff blamed her opponents for the fact that the government has not been able to stanch these losses. "Without political stability, we try, we try, we try, but things don't go forward – we need stability in order to return to growth and creating jobs," she said on Thursday.

Even impeachment does not promise an end to the crisis. Ms. Rousseff would, in theory, be replaced by Vice-President Michel Temer of the PMDB. But he is the subject of at least two corruption allegations; he faces a case in the Electoral Court that could keep him from the presidency (Ms. Rousseff is also named in the case), and only 1 per cent of Brazilians said they would vote for him as president.

"Dilma staying or going, neither will solve the country's problems," said Sonia Fleury, a political scientist with the Getulio Vargas Foundation, a Rio university. "Half the country is in favour of impeachment and half is not. If she stays, the opposition will continue to impede her ability to govern – and if another person takes power, the other side will block them, because they will not have legitimacy of votes."

Even critics of Ms. Rousseff this week acknowledged that she has permitted the Lava Jato investigation to proceed largely unhindered, even though her own party and ministers have been key targets.

Story continues below advertisement

Some are concerned that, should the PMDB (which has the largest number of politicians under investigation, for some of the most audacious alleged crimes) take power, they could move to shut Lava Jato down.

Carlos Fernando dos Santos Lima, a Lava Jato prosecutor, spoke this week about the fact that his office and the federal police were able to investigate because of the "non-interference of the political powers," unlike under previous governments. "I want to believe that a change [in government] will not mean a change in the trajectory of the public prosecutors," he said in a lecture in Sao Paulo on Wednesday.

Supreme Court Justice Luis Barroso articulated the sentiment of many Brazilians the next day in a discussion with graduate students, when he mentioned a widely reproduced photograph taken as the PMDB announced it was leaving government. It showed a group of senior political figures cheering – among them Eduardo Cunha, the PMDB leader in Congress and chief architect of the impeachment, who has been charged with taking more than $5-million (U.S.) in bribes, and others who also face investigation or charges.

"Those people who were raising their arms, I saw them – oh my God!" he said. "Is this the alternative of power?"