WARSAW, Poland (AP) — Poland and Hungary on Monday vetoed the European Union's next seven-year budget and a massive coronavirus recovery plan due to a new mechanism that links EU funding to the rule of law, plunging the 27-nation bloc into a political crisis.

The 1.8 trillion euro ($2.1 trillion) budget for 2021-2027 was agreed upon in principle last week after months of tough negotiations, and is meant to take effect within weeks.

It has sparked stiff resistance in Warsaw and Budapest, where right-wing governments are adamantly opposed to a tool that could cause them to lose EU money if they continue with policies seen as eroding democratic standards.

But EU ambassadors voted by a qualified majority - around two-thirds - in favor of the rule of law mechanism despite their objections. After that, the envoys “could not reach the necessary unanimity” to move ahead on the budget and recovery plan “due to reservations expressed by two member states,” Germany's spokesman in Brussels, Sebastian Fischer, tweeted.

Hungarian Prime Minister Viktor Orban’s press chief Bertalan Havasi said Monday that Orban had written a letter to German Chancellor Angela Merkel, European Commission President Ursula von der Leyen and European Council President Charles Michel saying he would veto the budget and post-pandemic relief package.

“There’s no agreement on anything until there’s an agreement on everything,” Orban wrote.

In Warsaw, Polish Justice Minister Zbigniew Ziobro declared at a news conference Monday that “There will be no consent to this mechanism” and that such a mechanism would “radically limit Poland’s sovereignty.”

EU officials insisted on the new mechanism linking rule of law to funding in order to have a tool to use against the governments of Prime Minister Mateusz Morawiecki of Poland and Orban of Hungary, both of which stand accused by the EU of eroding judicial independence and media freedoms.

In addition, Orban's government faces criticism for stigmatizing non-governmental organizations promoting civil liberties and for allegedly misusing EU funds to enrich his political allies.

EU European affairs ministers are set to discuss the standoff on Tuesday, and if it remains unresolved the bloc’s leaders could take it up at a videoconference summit on Thursday evening.

Some political observers think the threats amount to bluffing since by vetoing the entire budget, they would in effect cut off badly needed funds to their own countries, former communist states in Central Europe that receive more money from the EU pot than they pay into it.

The funding will be especially critical as Europe struggles to emerge from the economic downturn caused by the coronavirus pandemic. The budget is meant to take effect on Jan. 1, and officials are desperate to have the agreement rubber stamped within weeks.

Ziobro, the Polish justice minister, depicted the rule of law mechanism as an attempt by the German EU presidency to control Poland — an allegation that appeared targeted to older Poles who remember Germany's World War II occupation of Poland.

“It's not about rule of law, which is only a pretext, a beautiful word that goes nicely in the ear, but it is really about institutional, political enslavement, (and) a radical limitation of sovereignty,” Ziobro said.

In a weekly radio interview on Friday, Orban said that rule of law conditions resembled “ideological blackmail” practiced by the Soviet Union.

“If they really pass this (rule of law) regulation, then we will have created a Soviet Union out of the European Union,” he said.

___

Justin Spike in Budapest and Lorne Cook in Brussels contributed to this report.

Copyright 2020 The Associated Press. All rights reserved. This material may not be published, broadcast, rewritten or redistributed without permission.