Poland's right-wing government and the centrist opposition both claimed victory Tuesday over a ruling by Europe's top court on a controversial judicial reform that critics insist undermines the independence of the country's judges.

The European Union's Court of Justice (CJEU) ruled that Polish judges must decide on the validity of a disciplinary chamber imposed on them by the government, in a possible setback for Warsaw's contentious reforms.

As part of an alleged effort to assert greater political control, Poland's right-wing populist Law and Justice (PiS) government has created a disciplinary panel for judges that opponents allege lacks independence.

The CJEU on Tuesday stopped short of declaring the new body illegal, but asserted "the primacy of EU law" and said courts must not refer cases to the panel without ensuring it is "independent and impartial".

After taking office in late 2015, Poland's right-wing Law and Justice (PiS) party introduced sweeping reforms it insists are needed to tackle corruption.

It says it wants to overhaul a judicial system still haunted by the communist era.

But Brussels has accused the government of threatening to undermine principles like the rule of law and judicial independence that it signed onto in 2004 when Warsaw joined the EU.

In late 2017, the EU launched unprecedented proceedings against Poland over "systemic threats" posed by the reforms to the rule of law that could see its EU voting rights suspended.

Supreme Court President Malgorzata Gersdorf immediately called on Poland's government and parliament to eliminate the legal problems identified by the CJEU in order to "avoid a situation of uncertainty, even legal chaos".

She said the PiS-dominated parliament had passed the reforms "at night, quickly, without debate, without respect for the democratic system of legislation".

They have resulted in Poland's "judicial system being subject to political power and pilloried by international organisations", she said.

A pro-EU rally earlier this year in Warsaw, Poland, where the right-wing government has introduced controversial judicial reforms
A pro-EU rally earlier this year in Warsaw, Poland, where the right-wing government has introduced controversial judicial reforms AFP / Janek SKARZYNSKI

Supreme Court spokesman Justice Michal Laskowski said that until the laws in question are amended, both the current disciplinary procedures and the appointment of judges recommended by the PiS-created KRS National Judicial Council should be suspended.

Polish judges opposed to the reforms also hailed the verdict even though it did not go as far as some would have wished.

Krystian Markiewicz, president of the Iustitia judges' organisation, urged members of the KRS, whose independence is disputed in judicial circles, to "resign", and for the approximately 300 judges appointed on its recommendation to "refrain from making rulings" until the Supreme Court decision.

For his part, Polish President Andrzej Duda said the ruling demonstrated the CJEU's refusal to directly address the questions that three Supreme Court judges raised in their complaint against the PiS reforms.

"So these questions are political and they should find an internal solution inside our country, and the (European) court will not interfere in matters of Polish domestic policy, especially with regard to the functioning of the judicial system," Duda told reporters in Warsaw.

PiS Justice Minister Zbigniew Ziobro, the principal author of the reforms, said the CJEU ruling met his expectations.

He said it "means that the CJEU is not competent to judge matters related to the organisation of the Polish judicial system and has sent the ball back to Poland's court."

On November 5, the ECJ ruled that Poland was wrong to lower the retirement age of Supreme Court judges, a reform that critics said undermined the independence of the judiciary.

In Tuesday's ruling, the court said that when complaints over early retirement are appealed, Polish courts can only defer the decision to the disciplinary chamber if they judge the panel to be independent.

"The principle of the primacy of EU law thus requires it to disapply the provision of national law which reserves exclusive jurisdiction to the Disciplinary Chamber to hear and rule on cases of the retiring of judges," it said.

Retirement cases must "be examined by a court which meets the requirements of independence and impartiality and which, were it not for that provision, would have jurisdiction in the relevant field".