The European Union's top court should dismiss a challenge by Poland and Hungary to a new tool aimed at cutting cash payments to member states violating the bloc's rules on democracy, according to a legal opinion released today.

While the advocate general's opinion is not binding for the European Court of Justice (ECJ) - the EU's top court - the tribunal usually follows it when delivering its final ruling.

The opinion said the new policing mechanism does not overstep EU competencies laid out in the bloc's treaties as had been argued by Warsaw and Budapest.

Hungary's self-styled "illiberal" Prime Minister Viktor Orban and his allied eurosceptic Law and Justice (PiS) party in Warsaw have battled liberal EU countries and the bloc's executive in Brussels over the rights of women, LGBT people and migrants, as well as the freedom of media, courts and academia.

While rights activists have sounded the alarm over damaging the rule of law, Mr Orban and the PiS enjoy steady support on the back of broad public spending, nationalist rhetoric and conservative policies.

The EU has all but failed to force the two formerly communist member states to change tack, but last year agreed the new mechanism to withhold financing from the bloc's shared budget to those violating joint laws, including on human and citizen rights.

The tool is yet to be used and the eventual ECJ ruling will determine if it has any more teeth than those democratic safeguards previously in place.

Read more:
Poland wants to stay in EU despite court ruling
Polish prime minister says EU putting 'gun to our head'
Polish PM warns EU leaders of threat to bloc's future

Since joining the EU in 2004, Poland has been a leading beneficiary of the bloc's development funds, which are meant to help poorer member countries catch up with those better off.

As the country of 38 million people gets richer, it would become a net contributor rather than a beneficiary of EU funds.

A lawmaker with a junior coalition party known for its hard line rhetoric said last month that Poland could hold a referendum on leaving the EU in 2027 when the current long-term budget ends.

Poland's Prime Minister Mateusz Morawiecki dismissed any talk of a "Polexit".