MOST Brazilians, the opinion polls have reported for months, would be delighted to see the back of Dilma Rousseff, their president. After Eduardo Cunha, the Speaker of the lower house of Congress, set the impeachment of Ms Rousseff in motion on December 2nd, they may well get the chance.

Though the talk had recently receded, impeachment has been discussed for months. Nevertheless, Mr Cunha’s move is flawed and threatens only to drag Brazil deeper into the mire.

An act of personal revenge

It is not hard to see why Ms Rousseff is so disliked. Little more than a year ago she narrowly won a second term by vowing to defend Brazilians’ jobs, living standards and welfare benefits from the evils of a “neoliberal” opposition. It was a false promise. Because of mismanagement and overspending in her first term, the economy is trapped in a sickening vortex: output in the third quarter was 4.5% lower than a year earlier, the real has lost a third of its value this year; the fiscal deficit is nearing 10% of GDP and inflation is heading for 10%. Unemployment has soared to 7.9%.

Mainly because of the economy, Ms Rousseff is the most unpopular and ineffective president in modern Brazilian history. She lost control of Congress at the start of her second term; she has been unable to get the spending cuts and fiscal reforms needed to repair the economy. The audit tribunal rejected her government’s accounts for 2014, alleging that she hid the true state of government finances in an election year.

Then there is a vast corruption scandal centred on Petrobras, the state-controlled oil giant.

Prosecutors allege that, during the governments of Ms Rousseff and her predecessor, Luiz Inácio Lula da Silva, cartels of contractors paid huge bribes to politicians from the ruling Workers’ Party (PT) and its allies. Some of Brazil’s leading tycoons are in jail; more than 40 politicians are under investigation. The latest to be locked up on suspicion of wrong-doing—which they deny—are André Esteves, a billionaire investment banker, and Delcídio do Amaral, the government’s leader in the Senate.

Although there is plenty to be unhappy about, Mr Cunha’s impeachment bid looks like an act of revenge. Prosecutors are investigating whether he took bribes to arrange contracts with Petrobras, which he denies. He acted just hours after three PT members on the lower house ethics committee said they would vote to remove him from Congress. The reason he gave for impeaching the president is that this year she continued the practices condemned by the audit tribunal. Ms Rousseff deserves to be punished for her fiscal irresponsibility, but this is a technicality. In a democracy, impeachment is the supreme weapon: it should have a solid legal and political basis.

Ms Rousseff has vowed to fight back. She is not the one with Swiss bank accounts, she reminded Mr Cunha (his family’s, he says). The PT brands the impeachment “a coup”. That is wrong, but it heralds a divisive battle over the next few months. At present, there is no reason to believe that the opposition has the votes to remove the president. Next year that might change, especially if evidence emerges that ties Ms Rousseff personally to the wrongdoing at Petrobras, whose board she chaired in 2005-10 (none has so far).

Impeachment is thus the ultimate distraction for a government that was already too distracted to govern. That bodes ill for the economy. Ms Rousseff deserved another few months to try to get a grip. Should she fail, there would be a strong case for persuading her to resign for the good of her country. By striking too soon and on the flimsiest of grounds, Mr Cunha may have given a weak and destructive president a longer lease of life.