Poland is “on the road to autocracy”, the outgoing president of its highest constitutional court warned late last year. Since then it has travelled an alarming distance: thousands of Poles protested at the weekend against changes that undermine the rule of law by handing politicians control of who is in the judiciary and what they do. The response of the ruling Law and Justice party (PiS) has been to step on the accelerator – its proposals to terminate the appointments of all supreme court judges, unless the executive allows them to stay on, could be passed within days or even hours. The court is not only the final tribunal of appeal for all criminal and civil cases: it rules on the validity of elections, approves the financial reports of political parties and adjudicates on disciplinary proceedings against judges. This comes on top of laws passed last week giving parliament control over the previously autonomous body appointing judges, and ministers the power to appoint the president of each court, who decides which judge will sit in each case. The government had already manoeuvred its way to control of the constitutional court.

These developments are probably the most frightening manifestation yet of the rightwing, nationalist, populist illiberalism that has taken root in Poland and Hungary (predictably, PiS has portrayed the judiciary as corrupt and in service to the elite). The international community has struggled to respond – and some have encouraged and abetted such tendencies. Donald Trump’s visit to Warsaw, and his speech playing to the xenophobic tendencies of his host, sent all the wrong signals; many believe it encouraged the government to push on quickly with the judicial changes.

Similarly, Benjamin Netanyahu embraced Hungary’s Viktor Orbán on Tuesday despite the concerns of Hungarian Jews over his praise for wartime leader Miklós Horthy, who collaborated in sending Jews to death camps, and his concerted campaign against George Soros (whom Mr Netanyahu also dislikes). While Mr Orbán reiterated his opposition to antisemitism, Mr Soros and others say there is an unmistakable tone to the billboards attacking the Jewish financier for challenging the government’s anti-refugee stance – part of a dedicated campaign against him. The Israeli government overruled a statement from its ambassador condemning the posters.

Hungary and Poland (and the Czech Republic) could face financial penalties for barring the door to refugees, thanks to legal action by the EU, but feel vindicated by the way the political tide has swung against Angela Merkel’s more generous stance. The row over refugees reflects a more fundamental clash of values: hence Budapest’s attacks on NGOs and attempts to close the Central European University, founded by Mr Soros. In that sense, it is true to say that this personalised assault is not personal: it is about what Mr Soros represents. Hungary has not advanced anywhere near as far as Poland in undercutting the judiciary, but it is on a similar track; and attacks on the media, academia and foreign criticism are highly reminiscent.

When other EU states raised concerns about Poland’s “unconstitutional” reforms, the UK declared that countries had a right to pursue “their own democratic agenda”. Britain has its own agenda: driving a wedge between the Visegrad 4 and the rest of the EU to aid Brexit negotiations. It has cannily dispatched photogenic young royals to Poland, flattering the country without risking political embarrassment. Prince George was never likely to be quizzed about the new legislation. Meanwhile the rest of the EU, concerned by its increasing fragility, feels less able than ever to challenge outliers, though a number of countries – notably the Netherlands – have been energetic and some hope Emmanuel Macron may be persuaded to take up the charge. Belgium has raised the possibility of limiting Poland’s access to the EU budget. While Warsaw and Budapest attack the EU and its values, they are happy to take its cash.

• This article was amended on 20 July 2017. An earlier version referred to “Mr Soros’s Central European University”. This has been corrected.

