IF EUROPEAN history once seemed to have arrived at its terminus in 1989, it has sped off in a new direction in Poland. After winning the country’s first post-1989 outright majority in elections one year ago, the populist Law and Justice party (PiS) immediately set about undermining independent checks on its power, from the constitutional court to public media. Such antics would disqualify an aspirant from membership of the European Union, but it is harder to punish miscreants once they are inside. Surrounded by problems outside its borders, from Russia to Turkey to Libya, the EU now confronts a particularly chewy one within.

Outsiders sometimes lump Poland’s government in with the other populists making the running in much of western Europe. But while it shares their hostility to outsiders and taste for economic statism, PiS is a very Polish phenomenon. Its chairman, Jaroslaw Kaczynski, who runs the country from the party’s headquarters (the prime minister, Beata Szydlo, is a cipher who does her leader’s bidding), is fixed on completing what he considers an unfinished revolution. Mr Kaczynski believes the Polish state was captured by a cosy, treacherous elite after 1989, with the connivance of the EU. His aim is to overturn and replace it.

Mr Kaczynski often clashed with Poland’s constitutional court during a previous stint in office, from 2006-07. That explains his attempt this time around to stack the court with cronies, the proximate cause for the row with the EU. But perhaps a more important lesson was provided by the EU’s experience with Hungary. Under Viktor Orban, who took office in 2010 with a booming majority, Hungary’s government began its own assault on independent institutions. The EU howled but proved powerless; other governments chose to remain largely silent. Mr Orban now sits supreme on top of the “illiberal” state he boasts of building, taking regular potshots at Brussels.

Bruised by its experience with Hungary, in 2014 the European Commission, the EU’s executive arm, established a “rule of law framework” as a means to bring wayward governments to heel, which fell short of suspending their EU voting rights, as Article 7 of the treaty allows. But talks with Poland have gone nowhere: last week, as the latest Brussels deadline whooshed by, the government dismissed its concerns as “groundless”. Frans Timmermans, the first vice-president of the commission and Poland’s chief tormentor, has vowed not to back down. Article 7 may yet be invoked. But it can be applied only with the backing of EU governments, and Mr Orban has Mr Kaczynski’s back.

Here lies a lesson. Most countries of the former eastern bloc joined the EU not to dissolve their sovereignty, but to safeguard it. That preserves the EU’s popularity in the region—support for membership remains strong in Hungary and Poland—but leads governments to different places. Donald Tusk, Mr Kaczynski’s predecessor (and arch-enemy), sought to place Poland at the heart of Europe and to bind it close to Germany. Mr Kaczynski, by contrast, is doubling down at home and picking fights with Brussels where useful. In the summer EU officials thought they had clinched a deal on the court with the government, before Mr Kaczynski blew it up at the last minute.

This is bad news for Brussels. Like all its deadliest weapons, Article 7 was designed never to be used. But the theory of deterrence works only if the threat is credible, and the Poland row is testing that proposition to destruction. By pursuing its case against Poland to the end in order to deter others from imitating Mr Kaczynski, the commission may instead turn the spotlight on its own impotence (and fuel accusations of arrogance). Just as Mr Kaczynski has aped Mr Orban’s success, Europe’s next delinquent government will learn the lessons of Warsaw.

That does not mean Poland will seek to export its illiberalism, as some have supposed. Mr Kaczynski has muttered about reopening the EU’s treaties; his Europe minister, Konrad Szymanski, speaks vaguely of returning powers from Brussels to governments. But in truth Poland’s gaze is fixed firmly inward. Nursing grievances and lacking allies, Mr Kaczynski is without the means to bring change to Europe. Poland’s relationship with Germany has foundered. Its bond with France has been shattered by PiS’s bungling of a deal to buy Airbus helicopters. Mr Kaczynski’s supposed friends in the central European Visegrad group are shuffling away in embarrassment; even Mr Orban is said, sotto voce, to consider him a little unhinged.

Poland is not yet lost

Domestically, PiS does face one near-term threat: its reckless fiscal pledges, including a generous child-benefit payment and a plan to cut the retirement age. Some European politicians now think a borrowing crisis is the only way Mr Kaczynski can be stopped. Another problem is the government’s insistence on stuffing the bureaucracy with unqualified loyalists. Shorn of expertise, the civil service is struggling even to spend its EU subsidies. Nonentities have been placed in positions of authority; a former kebab-shop owner and PiS councillor now oversees research in a large state energy firm. Government contractors speak of brazen incompetence. Scandals look likely before PiS’s term expires.

Because their country needs Europe—on energy, Russia policy and EU subsidies—PiS’s Poland-first approach will ultimately prove self-defeating. Yet that leaves plenty of time to do lasting damage to Poland’s democratic institutions and political culture. Mr Kaczynski’s reign has already proved worryingly polarising. European politicians insist that theirs is a club of values, not convenience, and respect for the rule of law is baked into the treaties. But just as it cannot force governments to curb deficits or accept refugees, Brussels cannot impose liberalism by diktat; and other governments do not seem minded to rock the boat when they are trying to plug the leaks sprung by other crises. Mr Kaczynski will win this battle, because Europe has no idea how to fight.