DILMA ROUSSEFF, Brazil’s president, expected the anti-government protests on March 15th to be big. She convened a meeting of a crisis group at her official residence to monitor them. But nobody, including the organisers, imagined they would be as massive as they turned out to be. Police in São Paulo put the size of the crowd on Avenida Paulista, the preferred venue for such gatherings, at more than 1m; Datafolha, a pollster, counted 210,000. Either way, it was the biggest political demonstration in the country’s biggest city since the diretas já (“elections now”) movement that helped end military rule in 1985. Overall, police estimated that 2.2m people turned out in dozens of cities across all 27 states. That dwarfs the number who took to the streets on any single day in June 2013, the most recent occasion when Brazilians vented their anger at politicians en masse.

Trade unions, which had organised (much smaller) pro-Dilma demonstrations two days earlier, dismissed the protesters as privileged white people. Many were not. “I am black, poor and want Dilma out,” declared a demonstrator from one of the nine mobile stages along Avenida Paulista. Many wore the national football team’s yellow-and-green jerseys. Opposition politicians wisely stayed away. They realised that their presence would obscure the bottom-up message and reinforce the government’s claim that behind the protests were sore losers of last October’s elections, won by Ms Rousseff and her left-wing Workers’ Party (PT).

The grievances of 2013 were diffuse. Today’s are directed squarely at Ms Rousseff and the PT. Some protesters—about a quarter on Avenida Paulista, according to one poll—want her to be impeached over a multi-billion-dollar bribery scandal at Petrobras, the state-controlled oil giant. Most others simply want to show that they are fed up with sleaze and economic mismanagement, which has pushed up inflation and is likely to trigger a recession this year. A vocal fringe called for military intervention—but was shouted down.

Impeachment is unlikely. A serving president can be removed only for misdeeds committed during his or her current term of office. The focus of the Petrobras investigations is alleged bribery that took place well before Ms Rousseff began her second term, on January 1st. Besides, she has not been personally implicated.

The president’s real worry is that public anger plus parliamentary obstruction will thwart her plans for her second term, the most important of which is a correction of the economic course that she set in her first. Her working-class supporters hate the austerity needed to trim the budget deficit—a scary 6.75% of GDP—and avoid a downgrade of Brazil’s credit rating. Pro-Rousseff demonstrators railed against cuts in entitlements and condemned her finance minister, Joaquim Levy, as a “liberal infiltrator”. In February lorry drivers blocked roads in protest against rising fuel prices and other costs. The government caved in to many of their demands.

Pro-government parties command majorities in both houses of Congress. But many of Ms Rousseff’s allies are opportunistic at the best of times. The Petrobras scandal and the president’s plummeting popularity—just 13% of voters think she is doing a good job—make them even more prone to defect. The Supreme Court has approved criminal investigations of 34 sitting congressmen, all but one of whom belong to the ruling coalition. They include the speakers of the lower house and Senate, both members of the Party of the Brazilian Democratic Movement (PMDB). All deny wrongdoing.

The more they worry about clearing their names, the less likely they are to vote for unpopular economic measures. Renan Calheiros, the Senate president, formerly a loyal backer of Ms Rousseff, recently threw out of the chamber a presidential decree that would have ended some payroll-tax breaks. That forced her to resubmit it as a fast-track bill. Last week Congress came close to overturning presidential vetoes of two potentially budget-busting bills. One concerned adjustments to income-tax brackets, the other social-security charges for domestic workers. Majorities voted against the president, but they were not large enough to force the bills through.

After a long delay, Congress approved this year’s budget on March 17th. This will help Mr Levy to keep his promise to achieve a primary surplus (before interest payments) of 1.2% of GDP. But the string of near-defeats means he will need to tread carefully. He will have to consult the legislature extensively on economic decisions. As a result, the fiscal adjustment will take longer than he hopes. With luck, that will not trigger a downgrade.