Hundreds of Poles march to protest changes to the country’s judicial system in Krakow on August 6, 2018. Photo: Beata Zawrzel/NurPhoto via Getty Images

Polish president Andrzej Duda on Monday signed a law formally reinstating over two dozen of the country’s Supreme Court judges, who had been removed from the bench earlier this year under a new law cutting their mandatory retirement age from 70 to 65.

The purge of the judges, which Duda approved last December and which came into effect in July, was seen as another step in the campaign by the ruling Law and Justice party to assert control over the Polish judiciary, solidifying its power and helping advance its right-wing nationalist agenda. Leaders of the party, which came to power in 2015, have cast the judiciary as an obstacle to reform and justified the purge by saying it was removing judges originally seated in the Communist era.

The decision was met with protests in more than 60 cities and was condemned internationally, including by the European Union, which was already at odds with the Law and Justice over its previous moves to undermine democracy and the rule of law. Last year, the European Parliament censured Poland and threatened it with sanctions, up to and including the loss of its voting rights, in response to Duda’s judicial overhaul.

The chances of that ultimate sanction ever coming into force are essentially zero, however: While the E.U.’s founding treaty allows the bloc to strip a member state of its voting privileges, it has never done so, and this measure requires the assent of all 27 other members. Any attempt to punish Poland would be vetoed by Hungary, whose prime minister Viktor Orbán, a central figure of Europe’s authoritarian neo-nationalist movement, is a kindred spirit of Duda’s. Poland plays similar interference for Hungary, which has drawn fire from the E.U. for its attacks on academic freedom.

In October, the European Court of Justice issued an interim ruling in response to a complaint by the European Commission, ordering Poland to suspend the application of the law. After initially threatening to disregard that ruling, Warsaw said it would abide by it and agreed to reinstate the judges. The commission isn’t dropping its case against Poland, however, and the ECJ will still hear it and issue a final ruling early next year.

While the Polish government decided to follow the high court’s order, they’re not happy about it and will likely argue before the court next year that their changes to the judicial system do not in fact contravene E.U. law. Polish deputy justice minister Marcin Warchol criticized the court on Monday, saying: “The tribunal is … testing on our country certain ideas that are, unfortunately, connected to a superstate and creating a supranational system that the E.U. is.”

Warchol’s evocation of “superstates” speaks to one of the core arguments of Euroskeptic parties like Law and Justice, which is that supranational institutions like the European Commission and the ECJ effectively undermine national sovereignty by forcing countries to take actions with which their governments don’t agree and to which their populations did not consent. The argument has resonated with publics dissatisfied with the fruits of the post–Cold War order, facilitating the rise of right-wing populism from Poland and Hungary to the U.K., Italy, and France. These institutions, liberal and internationalist by nature, are now fighting to maintain their legitimacy in the face of a retreat into conservative and parochial attitudes throughout the continent.

If Law and Justice is taking a conciliatory posture toward the E.U., it’s not because the party has changed its position on the judiciary or on European institutions all of a sudden. All politics are local (i.e., domestic), and the party is fighting to sustain its popular support after a bribery scandal brought down the chairman of the country’s financial markets regulator, a Law and Justice appointee, last month. A recent poll put support for the party at 33 percent, down five points from 2015. That’s still comfortably ahead of its rivals, thanks in large part to a strong economy and low unemployment, but its fights with the E.U. and flirtations with the far right have begun to put dents in its appeal.

Support for the E.U. is remarkably high in Poland, with opinion polls in the past year finding anywhere from 65 percent to 92 percent of Poles in favor of remaining in the union; while the country has benefited significantly from its membership since joining the E.U. in 2004. Despite the Law and Justice party’s Euroskeptic posture, its leaders have long maintained that they intend to keep Poland in the E.U.; nobody is talking about “Polexit.” Nonetheless, being a part of the E.U. means accepting certain principles, including the primacy of European over domestic law, which the party’s nationalist ideology implicitly rejects.

For now, the Polish ruling party can walk the line between obeying Brussels’ rules and demagoguing against them (indeed, that conflict might be politically expedient for them), but the long game is to change the rules. Whereas rich countries like Britain and France have reacted to the perceived overreach of E.U. institutions with calls to opt out and go it alone, middle-income countries like Poland and Hungary have more to gain from co-opting the E.U. than from leaving it.

In its attempts to bolster its image, Law and Justice has its eye on Poland’s parliamentary elections next autumn, but also on European Parliament elections coming up in May. It is in those polls that Hungary’s Orban is hoping the neo-nationalist right will take control of the E.U., oust its liberal elites, and begin undoing 50 years of liberal consensus in favor of his illiberal vision of “Christian democracy,” which embraces the tyranny of the majority and uses it to enforce conservative social norms and suppress minority rights.

The odds of a full-blown nationalist parliament emerging from the European elections are exceedingly slim, but the European Conservatives and Reformists (ECR) alliance, of which Law and Justice is a member, is campaigning on a vision of a “scaled-back, flexible and decentralized” E.U. that grants more powers to national governments.

ECR is currently polling in sixth place, but could gain in prominence if more right-leaning parties decided to join it. Even a moderately anti-federalist coalition could loosen the control the union exercises over its members, giving populist strongmen like Duda and Orban more flexibility to carry out their agendas. Poland’s nationalists may have lost this battle with the E.U., but in the long run, they still have a distressingly good chance of winning the war.