European leaders for the first time on Tuesday agreed to link payment of EU funds to a member state with respect for the bloc's legal norms -- although Poland and Hungary insisted they had blocked tougher planned measures.

A hard-fought deal on a 750-billion-euro coronavirus recovery package and the EU's seven-year budget includes powers to cut funding from countries that breach so-called "rule of law" standards.

"It is the first time that the respect for rule of law is a decisive criteria for budget spending," EU Council President Charles Michel, who chaired the marathon summit, told reporters.

The final text is a compromise between northern countries that wanted all money stopped to governments that break the rules, and Hungary and Poland, which are under investigation for allegedly undermining European legal standards and democratic values.

Poland and Hungary had threatened to veto the EU's entire budget package if there was any linkage between funding and rule of law but, as the talks continued through a fourth night, a deal was finally reached.

Under the agreement, the European Commission, which oversees rule of law complaints, would propose punitive measures to the EU Council, which represents member states.

EU member states Hungary and Poland often come under fire in Brussels for allegedly undermining European legal standards and democratic values
EU member states Hungary and Poland often come under fire in Brussels for allegedly undermining European legal standards and democratic values POOL / JOHN THYS

Any cuts would have to be approved by a qualified majority of those member states.

This would require a vote of 55 percent of the EU countries representing 65 percent of its total population, which would make it easier for targeted governments to build a blocking minority of supportive capitals.

But the details of the system of rules still have to be confirmed unanimously by the EU Council -- giving Warsaw and Budapest veto power over them.

Hungary's Prime Minister Viktor Orban declared on behalf of his government and of Poland: "We fought it out, it was a huge victory."

"Prior to the negotiations or even during the negotiations there were some attempts to, I can't say humiliate, but at least educate us about our rule of law," he said.

Hungarian Prime Minister Viktor Orban's government is facing an investigation over its drift into authoritarianism
Hungarian Prime Minister Viktor Orban's government is facing an investigation over its drift into authoritarianism POOL / STEPHANIE LECOCQ

"And we didn't just manage to get a big package of money but we defended the pride of our nations."

Polish Prime Minister Mateusz Morawiecki's spokesman said Warsaw and Budapest had managed to block "arbitrary political mechanisms regarding budget reductions".

Morawiecki himself said Poland would never accept a link between money and rule of law.

"We have included (in the text of the deal) a stipulation that the European Council must give its position, and this is done by unanimity," he said in remarks quoted on Twitter by his press service.

"We are therefore protected on all sides."

Meanwhile, a spokesman for Germany's Chancellor Angela Merkel would not confirm claims in the Hungarian media that she had promised to bring the probe of Hungary to an end during her country's EU presidency -- that is, before the end of the year.

"Hungary has declared itself willing to take all the necessary steps in the Article 7 procedure so that a decision can be reached in the Council (of member states)," said German government spokesman Steffen Seibert.

"The German presidency of the Council has agreed to take this process forward in the limits of its possibilities," he said.

It had been proposed before this week's summit that EU funding be cut for countries that fall foul of the union's procedure, named after Article 7 of its treaty, which can lead to a state losing voting rights.

The EU Commission started the unprecedented Article 7 proceedings in December 2017, initially against Poland.

In September 2018, the European Parliament then initiated such proceedings against Hungary as well.

But the hurdles for sanctions are high, and an eventual withdrawal of EU voting rights is considered in Brussels to be the "nuclear option" in relation to member states. The EU governments therefore took no further steps.