FOR a glimpse of Poland under the populist Law and Justice (PiS) party, tune in to the news on the state television channel, Telewizja Polska (TVP). The opening sequence, a computer-animated tour of Polish landmarks, homes in on the clock tower of Warsaw’s royal castle. The capital’s most recognisable building, the towering Soviet-era Palace of Culture and Science, is nowhere to be seen. Then the anchors appear, and proceed to praise PiS slavishly while branding its critics treacherous crypto-communists.

This combination of subtle and brazen nationalist revisionism captures the two-and-a-half years of PiS rule. The party has purged the public administration, made it illegal to accuse the “Polish nation” of complicity in the Holocaust, and peddled conspiracy theories about the aeroplane crash in 2010 which killed then-president Lech Kaczynski and 95 others outside Smolensk, in Russia. It has turned a blind eye to chauvinism among its supporters, while prosecuting peaceful counter-protesters at the monthly commemorations of the Smolensk disaster led by Lech’s twin brother, Jaroslaw (pictured), who is PiS’s chairman.

Most troubling, PiS has neutered the constitutional tribunal and given lawmakers and ministers more power over the appointment of judges, threatening their independence. It has sown deep divisions within Poland and with its allies in the European Union, as well as with Israel and America. It has transformed Poland from a poster-boy of post-communist transition into the EU’s problem child. In March a judge in Ireland refused to extradite a Polish defendant to his homeland, worried that he might not get a fair trial.

And PiS isn’t done. Mr Kaczynski, who holds no office other than MP yet acts as Poland’s de facto leader, recently told a right-wing weekly that there are “parts of our reality which must not merely be modernised but ploughed over”. His party, he mused, needs at least three terms in office.

That prospect sends liberals scrambling for a stiff drink. It is a headache for the EU. In December the European Commission triggered proceedings against Poland under Article 7 of the EU treaty, which could ultimately lead to suspending its voting rights. In March, after the commission rejected Poland’s justifications of its reforms, the government proposed softening them, for instance by limiting the justice minister’s power to replace district-court presidents. But even if PiS yields further, the grief it has caused Poland will not go away.

The nationalist international

At first glance, the party’s ascendancy follows a familiar script. From Viktor Orban in Hungary to Donald Trump in America, populists have converted economic malaise and fear of immigrants into electoral success. Yet Poland departs from that script in important ways. Immigration is negligible; the wave of Syrian migrants in 2015, which initially crossed through Hungary, never touched Poland. Meanwhile, Poland’s economic performance has been nothing short of extraordinary.

The economy has grown for 26 consecutive years. GDP per person has nearly trebled since 1990 (see chart). Since 2000 manufacturing’s share of the economy has grown, and inequality has fallen. Poland was the only EU country to weather the crisis of 2008-09 without a recession.

For an illustration, drive north from Warsaw into Mazowsze. The region is as gorgeous as a Chopin concerto, an undulating quilt of cereal fields and birch groves, but in the 1990s its towns were unromantically down-at-heel. Today it is dotted with handsome farmsteads. Tractors are still mostly Polish-made Ursuses, but now come with air-conditioning and sound systems. In the cobbled market square of Pultusk, a town of 20,000, and down the road in the village of Golymin, shops offer luxuries unimaginable two decades ago: $100 Nike sneakers and wine at $20 a bottle. Such wealth accumulation was well under way by 2015. Yet PiS won both the presidential and parliamentary elections that year. In Pultusk, in the parliamentary election, the party claimed 46% of the vote, nine percentage points above its national average. In Golymin, it got 58%. Fatigue with the centre-right Civic Platform (PO) played a part. PO had grown complacent after eight years at the helm. In 2014 its charismatic leader, Donald Tusk, stepped down as prime minister to become president of the European Council, leaving his party rudderless. Its politicians were caught on tape discussing matters of state in filthy language. They said nothing terribly damning, but it left a bad smell. Many voters were in any event growing fed up with finger-wagging elites telling them to work harder to get ahead. This dual weariness, with the PO and the post-1989 gospel of self-improvement, played into Mr Kaczynski’s hands. He and his brother were among the leaders of the Solidarity movement who negotiated Poland’s bloodless transition to democracy. But Jaroslaw, especially, felt that it let ex-communists off the hook too lightly.

In 2001 the Solidarity coalition split into the PO, which embodied the post-1989 consensus, and the anti-elitist PiS. It appealed to those who, like the Kaczynskis, felt they deserved more, and who sensed that, while they might be prospering, well-connected insiders were doing better. In 2005 PiS took a quarter of the vote, enough for a plurality in parliament. But its unruly coalition with two other anti-establishment parties collapsed two years later.

By 2015 Poles’ sense of being shortchanged had grown, not because they were worse off, but because their aspirations outpaced reality. Many had experience of western Europe, where 2m or so had sought work since Poland joined the EU in 2004. Interviews with denizens of Pultusk-like towns by Maciej Gdula, a sociologist at Warsaw University, reveal that PiS supporters are neither left behind nor frustrated with their lives. But they want more—and they want it now.

PiS promised them less condescension and more protection. In Andrzej Duda it found a young, affable presidential contender who outmanoeuvred Bronislaw Komorowski, the PO’s respectable but dull incumbent. Beata Szydlo, Mr Kaczynski’s pick for prime minister, was less divisive than the chairman, who kept a low profile. Aided by images of migrants pouring into western Europe, PiS exploited fears of a Muslim invasion. The centre-left split into two camps, neither of which got enough votes to enter parliament. PiS won an unprecedented absolute majority.

With control of parliament and a sympathetic president, PiS prime ministers—first Ms Szydlo and, since December, Mateusz Morawiecki—set about delivering on campaign promises. They recklessly reversed a PO pension reform by cutting the retirement age, introduced a monthly benefit of 500 zlotys ($148) per child starting with the second-born, reformed the justice system (ostensibly to make it more efficient), and went after evasion of value-added tax, raising receipts by 23%. This flurry of activity made PiS’s critics look like weak, privileged naysayers. Meanwhile, the economy continues to grow at 4%, wages are up and inflation is subdued.

PiS is aided by an underlying conservative streak in Polish society. In the 1990s not even the left-wing governments championed social liberalism. Poland’s abortion law is among Europe’s strictest. The global #MeToo movement against sexual harassment has been more #NotMe in Poland, outside a few feminist circles. Pride in Poland’s undoubted virtues—it never collaborated with the Nazis, and was the first country in the Soviet bloc to topple communism—can turn xenophobic. At last November’s independence-day march, some openly carried fascist banners.

Until 2015 pro-European elites maintained a guardrail against such sentiments. PiS has dismantled it. “No Brussels bureaucrat will tell us what democracy is,” sums up one person close to Mr Morawiecki. What is democracy, according to PiS? First, it is majoritarian. Any constraint amounts to “legal impossibilism”, Mr Kaczynski’s term for what his liberal critics call checks and balances. The opposition is given short shrift. Legislation is pushed through as private-members’ bills, which unlike government proposals can dispense with public consultation. In 2016 40% of PiS’s 181 draft laws were submitted in this way, up from 15% and 13% in the previous two parliamentary terms. Lacking a supermajority to amend the constitution, PiS did the next best thing and nobbled the constitutional tribunal. It replaced five judges seated by the previous parliament (including two who, admittedly, the PO had appointed irregularly when a loss at the polls looked imminent). More egregiously, the government ignored several unfavourable rulings. The second feature of PiS-style democracy is rulers’ freedom of action. The justice minister doubles as the chief prosecutor, deciding which transgressions to prosecute (Smolensk counter-protesters) and which to ignore (marchers with illegal fascist flags). A draft law would sack the entire diplomatic corps and let the foreign minister rehire whomever he wants.

In this worldview cadres are everything. According to an analysis by the Forum of Civic Development, a think-tank in Warsaw, 37 PiS laws have led to the sacking of more than 11,300 civil servants. The party decides which ex-communists are repentant patriots (PiS’s ranks are full of such figures), and which are unreformed enemies of the state. Many of the latter, including military top brass, have been purged.

If this sounds like an affront to the constitution, the PiS-dominated tribunal seems unperturbed. It judged 88 cases last year, half as many as in 2015, nearly always siding with the government. When the civil-rights ombudsman, Adam Bodnar, challenged PiS’s reforms of the tribunal, including the dodgy investiture of three judges, his complaint was rejected by a panel that included two of the judges in question.

Does PiS, which won 38% of the vote in 2015, have a mandate to rip up the post-1989 social contract? Mr Morawiecki plays down Mr Kaczynski’s talk of revolution. But, he adds, “every contract can be amended.” Polish institutions need a shake-up, he says. Courts average 685 days to enforce a contract, the fourth-slowest in Europe. None of the provisions in the judicial reforms, he says, is unique to Poland.

Wolf in Italian wool

It is a cunning sales pitch. No single move looks revolutionary in isolation. Lithuanian supreme-court justices are appointed and dismissed by parliament at the president’s request. In Denmark and Sweden ministers appoint members of the judicial council. As blatant as the state media’s populist tilt is, PiS claims it is only correcting its historically liberal bias.

Mr Morawiecki, a millionaire former banker, was promoted to prime minister in December at the orders of Mr Kaczynski, who had tired of Ms Szydlo. He is worldlier and cleverer than his predecessor, and speaks fluent English. Where Ms Szydlo shunned Brussels, he engages.

Yet when it comes to ridding the state of the (mostly imaginary) remnants of communism, Mr Morawiecki appears to be a true believer. In the 1980s his father founded a radical splinter of Solidarity. Mr Morawiecki, then a teenager, was kidnapped by the secret police, beaten and told to dig his own grave, but refused to give up his father’s whereabouts. In contrast to many party colleagues, his disdain for the old regime seems genuine. But this zeal may lead him to push Poland closer to the sort of “illiberal democracy” which Mr Orban has created in Hungary, and which Mr Kaczynski makes no secret of desiring.

Poland is not quite Hungary. Its civil society is livelier. Its economy is more diverse and lacks media oligarchs, notes Jan-Werner Müller, a scholar of populism at Princeton University. Viewership of TVP news is falling, while independent newspapers benefit from the PiS version of the “Trump bump”. Where other populists cosy up to Vladimir Putin, Mr Kaczynski loathes Russia, which he blames (with little evidence) for the Smolensk crash.

PiS is not immune to criticism. Proposals to regulate independent media have been shelved. So have efforts to outlaw all abortions, after thousands of women took to the streets. Courts have mostly dismissed the charges against anti-PiS protesters. Ms Szydlo’s decision to award herself and her cabinet 2.1m zlotys before her demotion may cost PiS in local elections in the autumn. “Bonus-gate” may explain its slide in some recent polls.

The party is not as monolithic as myth would have it, either. In March Mr Duda broke ranks and vetoed a bill which would allow communist-era soldiers to be stripped of rank. A faction leery of Mr Morawiecki’s rise has tried to clip his wings. Neither he nor Mr Kaczynski controls Zbigniew Ziobro, the Jacobin justice minister, who leads his own group in parliament.

Then there is the EU. Besides the Article 7 proceedings, a growing chorus of member states wants future EU aid to be tied to rule-of-law considerations. Faced with a choice between revolution and EU money, which flows disproportionately to its poorer rural base, PiS may think again.

But even if PiS’s wrecking job were halted, deep scars would remain. Society has split into warring camps. A PO leader looks bemused when asked if he has friends in PiS. Mr Morawiecki’s aides react similarly to a question about pals in the PO.

Purges of the military and intelligence services have strained relationships with allies. Diplomatic fallout from the Holocaust law, which America and Israel see as whitewashing the role some Poles played, has been disastrous. Poland risks becoming like Turkey, a prickly ally important only because of its strategic location, says a Washington insider.

The economy, though healthy, could be better given the ruddy global outlook. Its rate of convergence with western Europe has slowed. A tight labour market and extravagant handouts have fuelled consumption (the government has doled out 42.6bn zlotys in the new child benefit alone since 2016) but not private investment. Grzegorz Baczewski of Leviatan, a bosses’ association, blames this in part on regulatory uncertainty. Laws affecting entire sectors are rushed through parliament. A ban on Sunday trading was passed in January and came into force in March. Mr Morawiecki’s talk of national champions and “national capital” risks putting off foreigners.