BRUSSELS (AP) -- The European Union's highest court ruled on Wednesday that the 27-nation bloc can suspend support payments to member states if they breach rule of law principles, and dismissed a challenge by Hungary and Poland.
The right-wing governments of both nations had argued that such action lacked a proper legal basis. Both nations, large recipients of EU funds, have come under increasing criticism over the past few years for veering away from the Western principles of the respect for democratic values in their nations.
"The Court dismisses the actions brought by Hungary and Poland in their entirety," the European Court of Justice said in a statement.
The ruling was hotly anticipated by many who had accused the two nations of democratic backsliding and had seen the linkage measure as the EU's most potent weapon to prevent a democratic legitimacy rift deepening within the bloc.
When it comes to democratic principles, "the European Union must be able to defend those values, within the limits of its powers," the court said.
The EU's executive Commission said it would await Wednesday's ruling before committing on whether to withhold funds but its president Ursula von der Leyen immediately welcomed the ruling.
"The Commission will defend the Union's budget against breaches of the principles of the rule of law. We will act with determination," von der Leyen promised.
Hungary's reaction was swift. Justice Minister Judit Varga slammed the ruling on her Facebook page, calling it a "political judgement" and proof that the EU was abusing its power.
"The ruling is another application of pressure against our country because we passed our child protection law during the summer," Varga wrote, referring to contentious Hungarian legislation last year which forbids the depiction of homosexuality or gender change to minors in media content. But the EU's passage of the rule of law mechanism pre-dates that Hungarian law, which many critics have decried as a violation of LGBTQ rights.
Both Hungary and Poland have in the past reasoned that the court was overstepping its authority in approving a new mechanism that is not described in the EU's own treaties. They said making such a link between finances and the legal decisions of independent member states amounted to blackmail from Brussels.
The court argued however that democratic backsliding had not only a political impact but also affected budgetary matters.
"The sound financial management of the Union budget and the financial interests of the Union may be seriously compromised by breaches of the principles of the rule of law committed in a member state," it said.
Poland and Hungary have faced criticism in the EU for years over allegations that they have been eroding judicial and media independence, among other democratic principles. The EU had found itself unable to do much to alter the course of either nation, and therefore turned to linking money to their adherence to democratic behavior.
Respecting democratic rule of law principles is a beacon of the EU admission criteria and the court insisted that, once in, those principles should stick.
"The Court specifies, first, that compliance with those values cannot be reduced to an obligation which a candidate state must meet in order to accede to the European Union and which it may disregard after accession," it said.
In Hungary, Prime Minister Viktor Orban has been pushing what he calls "illiberal democracy," which his critics say amounts to stifling democracy. In Poland, the Law and Justice party overwhelmingly dominates government and has also increasingly faced criticism from other EU member nations. The rightwing-government has broken the nation's own laws in order in order to gain political control over courts and judges.
Hungary and Poland initially sought to block the budget because of the introduction of the new mechanism, but eventually agreed to the plan on condition that the European Court of Justice would review it.