HIS foes accuse Mahinda Rajapaksa of many sins during his seven years as Sri Lanka’s president. They blame him for the savagery that cost so many civilian lives as his army defeated the rebel Tamil Tigers in 2009. They bridle at how he has carved up the government among his brothers, like a thriving family-run conglomerate. They resent the amendment of the constitution pushed through in 2010 to remove the limit on his tenure of two six-year terms, and to give himself legal immunity and the final say in appointments to the civil service, the judiciary and the police. And they suspect his regime of connivance in the beatings, disappearances and murders that have been used to intimidate critics in the press and elsewhere.

Nothing, however, seems to have caused such outrage among liberals in Colombo, the main city, as the decision by his government to impeach and sack the chief justice, Shirani Bandaranayake. Writing in the Sunday Times, a Sri Lankan newspaper, after government supporters had raucously celebrated the impeachment outside the chief justice’s house on January 11th, Kishali Pinto Jayawardena, a legal activist, turned to the words of Mark Antony in Shakespeare’s “Julius Caesar” to express her fury, lamenting “judgment fled to brutish beasts”. Sri Lanka, she claimed, had “entered its darkest phase since independence”.

This is surely over the top. Sri Lanka’s history has had some very black spots. Besides the vicious 26-year civil war waged by the brutal Tigers, Sri Lanka endured years of terror from a Sinhalese-Marxist insurgency in its south and was among the worst-hit victims of the devastating tsunami of December 2004.

The impeachment of Mrs Bandaranayake, in contrast, was a bloodless tussle of constitutional interpretation. Even the hysterical warnings of a constitutional crisis seemed a little overblown. Just a few days later it began to look more like a minor squall briefly interrupting the Rajapaksas’ ascent to the sunlit uplands of untrammelled power. Although Sri Lanka’s lawyers have almost unanimously rejected Mrs Bandaranayake’s impeachment and regard her replacement, Mohan Peiris, as an illegitimate government stooge, she did not force a confrontation by turning up to work on January 15th. Her entry to the Supreme Court would have been blocked by the police. She also moved her belongings out of the chief justice’s official residence, saying her life was in danger. Deprived of a figurehead, her disgruntled colleagues and supporters did not know where to turn.

The alarmists are quite right, however, that the affair has done perhaps irreparable damage to the rule of law and the independence of the judiciary. The ostensible cause of Mrs Bandaranayake’s impeachment was alleged corruption. She was found guilty of interfering in a case involving a company that had sold a flat to her sister, of not declaring bank accounts and of failing to resign when her husband, as chairman of a state-owned savings bank, faced bribery charges.

She and her supporters, however, see her troubles—and the farcically unfair hearing she was given—as political, stemming from court rulings the government did not like. In particular, the Supreme Court insisted on amendments to an anti-poverty bill that was set to confer great powers on the minister of economic development, the president’s brother Basil.

Constitutionally, the legislature has the power to impeach the chief justice. That it did so is partly the fault of the Supreme Court itself. After the 2010 election, it ruled that an opposition party could not sack members who had crossed the floor of Parliament to join the government coalition. Since Sri Lanka has a system of proportional representation, this seemed perverse. But it gave the government the two-thirds parliamentary majority it needed to ram through its objectionable constitutional amendments—and to impeach the chief justice.

This month, however, the Supreme Court ruled that the impeachment process was unconstitutional. Since it has the sole power to interpret the constitution, that should have been the end of the matter. Instead, Parliament and the president have flouted its authority. They have put the executive branch above the law. It is not just the Colombo intelligentsia that is appalled. Foreign watchdogs, the Commonwealth, and America, Britain and Canada have all voiced alarm.

In the short term, the government can probably get away with it. The president still basks in the popularity of a man who won the war and ended the fighting. Concerns about the way he did so are seen as squeamish foreign bleats. And the economy is forecast to grow by nearly 7% in each of the next five years. The lawyers who this week flew black flags and blew out symbolic candles will lack supporters in Sri Lanka’s villages.

In the long run, however, trashing the rule of law has costs. International criticism, centred since 2009 on the failure to give any serious accounting of possible war crimes, now has another angle: the integrity of Sri Lanka’s democracy. Already, in Canada, for example, politicians are calling for a boycott of the Commonwealth summit to be held in Colombo in November. Foreign investors, too, may worry that the legal system has become, in effect, an arm of government.

Judge not, that ye be not judged

The administration’s supporters have likened Mrs Bandaranayake’s impeachment to that of the Philippines’ chief justice last year. That was seen as both proving the anti-corruption credentials of the president, Benigno Aquino, and removing an obstacle to his reforms. But they may also have had in mind activist judiciaries closer to home. India’s has intervened on issues ranging from forest conservation to bus fuel. More tellingly, Pakistan’s has seen off one dictator, Pervez Musharraf, and just this week ordered the arrest of a prime minister of an elected government. Their Sri Lankan colleagues must envy them.

Economist.com/blogs/banyan