THE street vendors who set up around Brazil’s congress must have been disappointed. Police had expected thousands to gather for the closing stages of the impeachment trial of Dilma Rousseff, Brazil’s president. But when the senate voted by 61 to 20 to remove her from office on August 31st, the esplanade, bisected by a fence to prevent clashes between her foes and her supporters, was eerily empty. Her former vice-president, Michel Temer, who has been interim president since May, was sworn in hours later to serve out the remaining 28 months of her term.

It was a muted end to a remarkable era. For the past 13 years Ms Rousseff’s left-wing Workers’ Party (PT) has dominated politics. The party broke barriers. Luiz Inácio Lula da Silva, Ms Rousseff’s predecessor and patron, became the first working-class president in 2003; she was the first woman to hold the job. The global commodity boom paid for programmes that helped 40m people lift themselves out of poverty. Many Brazilians remain grateful.

But Ms Rousseff’s impassioned self-defence before the senate on August 29th moved few of them. The charge against her—that she tampered with government accounts to conceal the size of the budget deficit—was not an impeachable offence, she insisted. She compared her ordeal to the injustice and torture she had suffered as a left-wing guerrilla during Brazil’s military dictatorship of 1964-85. Conservative political and business elites were persecuting her again, this time to sabotage her pro-poor policies, she contended.

In fact, her downfall was brought about by Brazil’s worst-ever recession, which is partly her doing, by the multibillion-dollar scandal centred on Petrobras, the state-controlled oil company, and by her own political ineptitude. The people hit hardest by her policies were those she sought most to protect. Nearly 12m Brazilians, about one worker in nine, are jobless, a third more than a year ago. The economy shrank 3.8% year-on-year in the second quarter of 2016, the government reported on August 31st. But with inflation close to 10%, the central bank had little choice but to keep its target interest rate unchanged at 14.25%. That, too, is largely Ms Rousseff’s fault. During her first term in 2011-14 she pressed the bank to ease monetary policy prematurely.

Mr Temer now promises to revive the economy, largely by reversing her policies. His talk of privatisation, deregulation and fiscal discipline has cheered investors. “Our motto is to spend only what we collect,” he said in his first television address as president. His economic team, led by the finance minister, Henrique Meirelles, inspires confidence. The São Paulo stockmarket and the real, Brazil’s currency, have strengthened since Mr Temer took charge. The cost of insuring government bonds against default has fallen by a quarter.

Among ordinary voters, though, the new president has little more support than the outgoing one. His approval rating is below 20%, according to recent polls. His Party of the Brazilian Democratic Movement (PMDB) is as embroiled in the Petrobras scandal as the PT, its ally for more than a decade. Half of Brazilians want a chance to choose a new president in a fresh election. This would heal wounds opened by the flawed impeachment process, says João Castro Neves of Eurasia Group, a consultancy, but it would also delay urgent economic reforms. Mr Temer has no intention of triggering an election by resigning.

Now it’s Michel’s mess

Instead, he will begin the Herculean task of cleaning up Brazil’s chaotic public finances. Ms Rousseff began her presidency with a primary surplus (before interest payments) of 3.1% of GDP and ended it with a deficit of 2.7%. That deterioration raised borrowing costs, which made the fiscal situation still worse. The overall deficit is an alarming 10% of GDP.

If nothing is done, warns Vilma Pinto of FGV-IBRE, a think-tank, public debt will exceed 110% of GDP in 2022, double what it was when Ms Rousseff took office, and will keep on rising. That could lead to a default, or to a return of the hyperinflation that blighted the decade after 1985. That was tamed by Itamar Franco, the last vice-president who was thrust into the top job (by the impeachment on corruption charges of Fernando Collor).

Mr Temer hopes to work similar wonders. He is counting on two measures to achieve that: a 20-year freeze on public spending in real terms and a reform of the pension system, which generously rewards retired workers at the expense of everyone else. Both require amending the constitution. The proposals stalled during the impeachment process. Now, the government promises, both will move ahead.

Many analysts say they are not ambitious enough. The budget presented on August 31st did nothing to dispel those worries. It would reduce the primary deficit only modestly, to 2% of GDP. Under the proposed spending freeze, the government would not run a primary surplus before 2021, says Ms Pinto. Public debt would peak at 90% of GDP in the early 2020s. That would probably avert catastrophe, but it would still crimp Brazil’s capacity to respond to economic shocks, such as a sudden domestic slowdown or a flight by nervous foreign investors.

Faster deficit reduction will be politically painful. Brazilians want more from public services, not less. A survey in July found that a third of Brazilians had dropped their private health insurance over the past year because of economic hardship; they now rely on public clinics. Some 14% of parents say they have withdrawn children from fee-charging schools. Plenty of wasteful spending remains that could be cut without hurting ordinary Brazilians, reckons Alberto Ramos of Goldman Sachs, an investment bank. Non-interest expenditure grew twice as fast as the economy under the PT. “It is hard to believe that all that was wise and efficient,” says Mr Ramos.

Opposition from the PT will be ineffectual. Demoralised by recession and scandal, it is fielding half as many mayoral candidates in October’s local elections as it did four years ago. Its distinctive red star has disappeared from some candidates’ campaign literature. Lula, still its most popular leader, has been charged with obstructing the investigation of the Petrobras affair. He denies wrongdoing. Several other party leaders are serving prison sentences.

As so often in Brazilian politics, the president’s friends may prove more troublesome. The spending freeze and the proposal to raise the retirement age need three-fifths majorities in both houses of congress to pass. Mr Temer’s PMDB wants them watered down, for example by ring-fencing parts of health and education spending (together a third of the federal budget). The odds of other structural reforms, to Brazil’s Mussolini-era labour laws or its Byzantine taxes, are slim.

Mr Temer will thus have plenty to ponder on his long flight to the G20 meeting on September 4th-5th in China, his first official trip as president. In striving to be the next Itamar Franco he could suffer the fate of José Sarney, a vice-president who was unexpectedly promoted in 1985 after the end of military rule. Mr Sarney proposed a series of half-baked inflation-fighting plans that only made things worse. The resulting turmoil helped usher in a telegenic populist in 1989: Fernando Collor.