JUDGES are a pampered caste of crooks, according to Poland’s governing Law and Justice party (PiS). On July 3rd its new law on the Supreme Court took effect, the culmination of a series of judicial changes pushed through by the party. The European Union has urged the government to back down, warning that it is undermining the rule of law. Poland represents a vital battle for Brussels. If the EU cannot defend its fundamental values, including the rule of law, within its own borders, other illiberal leaders will surely take note.

The latest judicial reform lowers the retirement age from 70 to 65 for judges on the Supreme Court, which, among other responsibilities, rules on the validity of elections. As the law took effect on July 3rd, more than a third of its 72 judges were forced to step down. Some have asked the president for permission to stay on for the rest of their six-year terms, but critics fear the only judges to be granted that permission will be the pliant ones.

The purge follows a verbal campaign against judges by PiS politicians, who have called them a “caste of superhumans” and “a state within a state” with a murky past under communism (there is some truth to the second of those charges). Mateusz Morawiecki, the prime minister, recently alleged that an “organised criminal group” is operating at a court in Krakow.

Poles are split over PiS’s reform. According to a poll in June, some 44% say Supreme Court judges older than 65 should not be allowed to give judgments; 33% disagree. At dusk on July 3rd a crowd gathered outside the Supreme Court in Warsaw to protest against the changes. Other protests took place in over 60 towns across Poland. At the one in Lublin, a city in the country’s conservative east, a banner on the district courthouse urged Europe to protect the Supreme Court. “Without rights there is no freedom,” it read.

Despite its long stand-off with Warsaw, the EU has failed to stop the purge. In December, citing “a clear risk of a serious breach of the rule of law” in Poland, the European Commission triggered action under Article 7 of the EU treaty, which could eventually result in the country’s voting rights being suspended. The chance of that happening is remote, however, because such a decision would require a unanimous vote by the other EU governments, and Hungary, for one, has vowed to stop it. Without the required support of four-fifths of the EU’s countries even to get to an earlier stage of condemnation, the procedure has reached an impasse. In a last-minute effort, the commission on July 2nd launched a separate infringement procedure against Poland for violating EU law with its changes to the Supreme Court. The Polish government now has a month to respond. After that, Poland could face a case before the EU Court of Justice, which can impose large fines but which cannot strip Poland of its voting rights.

Defying the new law, most of the Supreme Court’s judges came into work on July 4th, where they were greeted by a crowd of supporters, some holding posters with “konstytucja” (constitution) printed on them. The fate of the Supreme Court’s president, Malgorzata Gersdorf, who turned 65 last November, is uncertain. The presidential palace says she is retiring; she says no, her term is guaranteed by the constitution. By opposing the reform, judges are turning the court into a circus, said Marek Suski, head of the prime minister’s cabinet, on July 2nd. As PiS pushes on with its overhaul of Poland’s institutions, it is unclear who will have the last laugh.