DONALD TUSK’S appointment as president of the European Council in 2014 seemed to complete Poland’s journey to the heart of the European Union. A decade after Poland led the accession of eight former Soviet-bloc countries, its prime minister was elevated to one of the most senior posts in Brussels. The job involves chairing summits of European leaders and forging compromise from their debates. At first some thought Mr Tusk operated more like a Polish prime minister than a consensus-seeking European. But most came round as he coolly shepherded the EU through the Greek bail-out, the refugee crisis and Britain’s Brexit vote. His election to a second two-and-a-half-year term at an EU summit on March 9th looked like a formality.

Instead, Mr Tusk found his own country blocking his path, and a Polish political psychodrama imported to Brussels. Beata Szydlo, Poland’s prime minister, circulated a letter to her fellow heads of government that more or less accused Mr Tusk of treason. “He used his EU function to engage personally in a political dispute in Poland,” she wrote. (This may refer to a speech Mr Tusk made in Wroclaw last year calling on the government to respect the constitution.) Ms Szydlo nominated Jacek Saryusz-Wolski, an obscure member of the European Parliament, to replace Mr Tusk.

In the end the matter came to a vote, an unusual development in a forum that prefers to settle such matters by acclamation. Despite speculation that Hungary, which often sides with Poland, might support the gambit, Mr Tusk was re-elected by 27 votes to one. Ms Szydlo responded by sulkily blocking the summit’s conclusions on matters such as trade and defence, an act without legal significance.

Animosity between Mr Tusk and Jaroslaw Kaczynski, who as head of the ruling Law and Justice (PiS) party is the true leader of Poland, has been brewing for over a decade. Mr Kaczynski absurdly blames Mr Tusk for a plane crash in Smolensk in 2010 that killed his twin brother Lech, then Poland’s president. By smearing his arch-enemy as a traitor, Mr Kaczynski may hope to reduce Mr Tusk’s chances of ever returning to domestic politics.

In the eyes of PiS and its supporters, Mr Tusk and his centre-right Civic Platform party exemplify a post-communist elite that sold out Polish interests after 1989. A histrionic video published by PiS this month blames Mr Tusk for destroying Poland’s shipbuilding industry. The strong relationship Mr Tusk forged with Germany as prime minister has been turned against him. Witold Waszczykowski, the foreign minister, said the vote in Brussels proved that the EU is “under Berlin’s diktat”.

A similar level of paranoia could be traced behind the Polish government’s decision, on March 14th, to approve an amendment to the law on the foreign service. Ostensibly the new law will remove those who co-operated with the communist-era security apparatus; according to the draft, some diplomatic posts abroad resemble skanseny (open-air museums) of the communist era, while some diplomats are accused of having “insufficiently strong bonds with the Polish state”.

In reality, if the law is adopted by parliament, the effect will be much broader: all foreign-ministry employees’ contracts will be terminated in six months. Only those offered new ones, according to unspecified criteria, will stay on. It could thus become far easier for PiS to stuff the foreign service with loyalists or those keen on its more confrontational foreign policy. The amended law states that the service’s role is to “protect Poland’s sovereignty”, which echoes Ms Szydlo’s calls to stand up to Brussels. Even if the foreign service does not end up exclusively staffed by PiS cronies, the change would permanently politicise a fairly neutral institution.

PiS has pursued a worrying policy of polarisation since winning the election in 2015. Mr Kaczynski’s government portrays its political opponents as enemies of the state. Its purges of official institutions aim to cement PiS’s own vision of the post-1989 revolution, and have turned state media into a mouthpiece of the regime. The tactics appear to be working: the government dominates opinion polls.

Poland is drifting ever further from the European mainstream. From energy to climate to the preparations for a big EU summit in Rome this month, diplomats and officials describe a government that is becoming increasingly hard to work with. Some urge the commission to trigger Article 7 of the EU treaty, the as-yet unused “nuclear option” that could see Poland’s EU voting rights suspended. The government will be the first victim of the futile diplomatic to-do it provoked; it can hardly expect generous treatment in the forthcoming negotiations over the EU budget, for example. After his re-election, Mr Tusk warned that burned bridges cannot be crossed again. But Mr Kaczynski appears to be in the grip of full-blown pyromania.