European Union flags flutter outside the European Central Bank (ECB) headquarters in Frankfurt, Germany, April 26, 2018. REUTERS/Kai Pfaffenbach

BRUSSELS (Reuters) - The European Union will cut funds for member states undermining the rule of law and risking to compromise spending of EU taxpayers’ money, the bloc’s executive said on Wednesday in its joint budget proposal for 2021-27.

The plan comes in response to the eurosceptic, populist rulers in Poland and Hungary where governments have put pressure on critical media and non-governmental groups, promoted harsh anti-immigration rhetoric and introduced changes to the judiciary that critics say go against democratic standards.

How the bloc deals with some of its own governments flouting liberal values and the rule of law has emerged as a key challenge to the future of the EU, which has already been tarnished by Brexit.

Britain’s departure will also leave a big hole in the bloc’s next, long-term budget and the European Commission’s Wednesday proposal will now be discussed by all the remaining 27 EU states and the European Parliament.

“Only an independent judiciary that upholds the rule of law and legal certainty in all member states can ultimately guarantee that money from the EU budget is sufficiently protected,” the Commission said.

It proposed new tools to “suspend, reduce or restrict access to EU funding” to capitals deemed unable to ensure proper spending of handouts from the bloc because of deficiencies in the rule of law.

Beyond the post-communist eastern members, the EU’s long economic downturn after 2008 and a migration crisis that followed in recent years have given rise to euroscepticism and populism from France to Austria to the Netherlands.

While Poland is the only EU state ever to be formally put under a punitive procedure by the bloc for subduing courts and judges to more direct government control, the Commission highlighted strong courts were key in ensuring fair tenders, fighting corruption and effective appeal mechanisms.

The Commission also said it would set aside money for a new program designed specifically to promote “open, democratic, inclusive and creative societies... by putting forward European values, cultural and linguistic diversity and heritage.”