THE genius of democracy is that voters can boot out a government without damaging the state. But sometimes a new government, not content with whisking the old one from the podium, will take a hammer to the stage itself. That is the worry in Poland. The populist Law and Justice party (PiS), swept back into power after eight years in opposition, is remaking the country in a hurry (see article). It has violated the constitution to replace the previous government’s appointees on the constitutional court, put partisans in charge of the intelligence agencies, purged officials and backtracked on Poland’s commitments to the European Union. When PiS was last in power, its tenure was marked by erratic policies and nationalist paranoia; it appears not to have mellowed with time.

Poland matters. It is the anchor of east-central Europe, the region’s biggest country and largest economy by far. It has been the flagship of the EU’s eastward expansion, proof that democracy and the rule of law can spread. Its stability, prosperity and pro-European orientation have won it respect and diplomatic clout. If PiS wants that era to end, it is going about it the right way. The party’s leader, Jaroslaw Kaczynski, admires Hungary’s prime minister, Viktor Orban, who says he favours “illiberal democracy”. PiS is taking its first steps in the same direction. An EU weakened by crisis is ill-prepared to resist it.

Obviously, there is nothing wrong with Poles deciding to turf out their government. PiS won the presidential and parliamentary elections this year because voters were fed up with the centrist party, Civic Platform, which had acquired an aura of complacency and sleaze. PiS’s animating drive is hostility to Poland’s liberal, secular, urban elite. It is a motley coalition of social conservatives, Catholic nationalists, Eurosceptics, anti-corruption zealots, conspiracy theorists, protectionists and agrarians. Like many populist parties, it mixes illiberal foreign and cultural policies with statist and short-sighted economics. One of its first plans is to lower the retirement age, reversing a reform by the previous government. This is fiscally reckless in rapidly ageing Poland, but popular with the greying voters who back PiS.

The last time PiS was in power, in 2005-07, it picked fights with Germany and created an atmosphere of hysterical unpredictability. Party officials advanced a theory that the post-Soviet Polish state was secretly run by communist-era apparatchiks. After PiS lost power, when a plane crash in Smolensk in 2010 killed President Lech Kaczynski (Jaroslaw’s twin brother) and dozens of others, many in the party alleged that Russia had brought it down—and that Civic Platform and its leader, Donald Tusk, had covered this up.

During the elections, the party ran a moderate, Beata Szydlo, for prime minister. But since it took power, Mr Kaczynski has pulled the strings. Antoni Macierewicz, one of the worst plane-crash conspiracy theorists, is now defence minister. The new culture minister threatens to purge the public broadcasters. PiS opposes gay rights, and President Andrzej Duda has vetoed a sex-change law for fear that pregnant women might become men before giving birth. Mr Kaczynski warns that Muslim migrants “carry diseases”. There are murmurs of putting Mr Tusk, now president of the European Council, on trial.

This lurch towards populism will hurt Poland. But the broader worry is that it will cripple the EU on critical issues, particularly the refugee crisis. The European Commission’s plan for redistributing migrants across the union faces dissent from Hungary and two other members of the Visegrad group, Slovakia and the Czech Republic. A deal was reached only with the backing of Visegrad’s fourth member, Poland. The PiS government is now threatening to renege. The Visegrad group lacks the votes to block commission decisions, but if it becomes an illiberal bulwark, Europe’s east-west divide will become a chasm.

That way lies madness

The conspiracy theories that PiS favours play on Polish feelings of victimhood which are deeply held—and deeply self-indulgent. The facts may seem obvious, but they need restating. The peaceful collapse of communism in Poland was a triumph, not a plot. The plane crash in Smolensk was an accident. The past 25 years have transformed the country into a European heavyweight; EU membership was essential to that success. Good relations with Germany benefit Poland, especially in opposing Russian aggression in Ukraine.

In normal times Europe could afford to wait for PiS to come to terms with reality. The new government has only just started its vandalism. PiS might yet correct course or fall victim to poor organisation and infighting. Poland has institutions that are capable of defending their independence. It takes a lot to ruin a nation.

But these are not normal times. The EU faces challenges, from refugees to climate change to Vladimir Putin. Countering them will be much easier with Polish partners who are part of the solution, not part of the problem. The alternative is a Europe that cannot get things done and the slow decay of Poland’s institutions. Its citizens should tell PiS to stop now.