YOU don’t have to be Brazilian to have been astonished by the events of recent days. In the early hours of March 4th police showed up at an apartment block in São Bernardo do Campo, near São Paulo, and took away for questioning a former president, Luiz Inácio Lula da Silva, who is beloved by many for his humble origins and his pro-poor policies. They were looking for evidence that Lula and his associates benefited from the gargantuan bribery scandal centred on Petrobras, the state-controlled oil company (see article). Five days later, in a separate case, prosecutors charged the former president with hiding his ownership of a beachfront flat.

Dozens of politicians suspected of taking bribes, and businessmen thought to have paid them, have been caught up in the Petrobras scandal. Lula, president from 2003 to 2010, is the most consequential figure among them. He denies wrongdoing. On March 8th Marcelo Odebrecht, former head of Brazil’s biggest construction company, was sentenced to more than 19 years in prison for corrupt dealings with Petrobras.

Brazilians take consolation from seeing the rich and powerful held to account. Sérgio Moro, a judge who is leading lava jato (car wash), the main investigation into the scandal, is a hero to many. But the scandal is also the focus of a ferocious political battle between the left-wing Workers’ Party (PT), to which both Lula and his successor as president, Dilma Rousseff, belong, and an opposition composed of disparate political parties and popular movements.

Lula’s detention and the filing of charges against him have escalated those hostilities. Anti-government groups are to hold demonstrations on March 13th to renew their demand that Ms Rousseff be impeached. Her allies intend to hold counter-protests on the same day. Both camps are in danger of forgetting that justice is, or ought to be, blind. PT politicians accuse prosecutors of plotting a “coup”. But the opposition’s demands for impeachment have also raced ahead of evidence that would justify such a drastic step. The one charge that has stuck, that Ms Rousseff used accounting tricks to hide the true size of the deficit in 2014, does not provide legal grounds for evicting her from office.

Waxing and waning: Brazil's economic woes, in charts Brazilians rarely settle their political differences through violence, but the ferocity on both sides risks damaging the consensus that underpins the country’s admirable democracy. The PT and its allies are the worst offenders. After Lula’s detention the party’s leader in the lower house of Congress declared a “political war”. In a tweet it later erased, the PT called Lula a “political prisoner”. At the same time, in forcibly detaining Lula, rather than asking him to volunteer to be questioned, Mr Moro may also have gone too far. A supreme-court justice accused him of breaking “basic rules”.

Keep calm, and carry on investigating

The Petrobras scandal could yet fell the government. The electoral court is looking into whether Ms Rousseff’s re-election campaign in 2014 was financed with money siphoned off from the oil company. If so, the court could annul the election and call a new one, which any candidate from the PT would almost certainly lose.

A new government would stand a better chance of pulling Brazil out of its morass. Faced with a choice between sane economics and political survival, Ms Rousseff has chosen the latter. She has backpedalled on fiscal reforms, which alone can restore confidence in an economy suffering its worst recession since the 1930s. Her departure would, surely, be cause for celebration—but only if it comes about through the courts or the ballot box, not cynical political machinations.

Correction: An earlier version of this leader said that Lula was president from 2003 to 2013. We were too generous. His presidency ended in 2010. This has been corrected.