With the European Union convulsed by successive crises – over euro zone debt, migration and now the United Kingdom’s impending withdrawal – the authoritarian drift in Poland and Hungary has been overshadowed by wider existential angst. But the long-term threat posed by the rejection of liberal democratic norms at the heart of Europe is just as fundamental for the union.

Poland, a key European power with a population of almost 40 million, should aspire to leadership in a post-Brexit EU. Instead, under the socially conservative, eurosceptic and nationalist Law and Justice (PiS) party, Warsaw has been retreating towards the fringe. Since coming to power in 2015, PiS has steadily dismantled judicial oversight, brought the independent prosecutor’s office under government control, made it easier for the state to spy on its own citizens and turned the public broadcaster into a propaganda outlet. The ruling party very much likes EU structural funds, but it shows undisguised contempt for other parts of the union’s grand bargain. For example, Poland has refused to take in a single person under a 2015 scheme to relocate 160,000 asylum seekers from Greece and Italy.

In the past week, many Poles have taken to the streets to protest the government’s attempts to enact sweeping powers to hire and fire judges, including those on the supreme court. That’s just the latest sign of how the PiS is systematically chipping away at the rule of law and removing institutional checks on its own power.

Two external powers have the leverage to lean on Warsaw: the United States and the EU. Donald Trump, who delivered a speech in tune with the nativist inclinations of his hosts in Warsaw earlier this month, is clearly not up to the task. But Brussels can and should act. First it should use its power to initiate infringement proceedings over Poland’s assault on the separation of powers. Then it should make clear that when talks begin on how to share out the smaller EU subsidy pie post-Brexit, respect for the EU’s fundamental values will be a non-negotiable prerequisite.