BRUSSELS (Reuters) - Poland broke European Union law when it lowered the retirement age for judges in 2017 and introduced a different retirement age for women and men in the profession, the EU’s top court ruled on Tuesday.

FILE PHOTO: A guard officer walks into the Supreme Court in Warsaw, Poland August 13, 2018. REUTERS/Kacper Pempel/File Photo

The ruling dealt a further blow to the nationalist Polish government in a long-standing battle with the European Commission, which says Warsaw is breaking the rule of law in the country by undermining the independence of courts.

The ruling euroskeptic Law and Justice party passed a law in 2017 that lowered the retirement age of judges in ordinary courts and public prosecutors - and the age for early retirement of Supreme Court judges - to 60 years for women and 65 years for men, from 67 for both sexes.

It also gave the justice minister, a politician from the ruling party, the power to extend the period of active service of judges in the ordinary courts beyond the new retirement ages.

The Commission, the EU’s executive arm whose role is to safeguard law across the 28-nation bloc, said Poland’s measures were contrary to EU law, and it sued Poland in the European Court of Justice.

“(Poland)... failed to fulfill its obligations under EU law, first, by establishing a different retirement age for men and women who were judges or public prosecutors in Poland and, second, by lowering the retirement age of judges of the ordinary courts while conferring on the Minister for Justice the power to extend the period of active service of those judges,” the European Court of Justice (ECJ) ruled.

Poland’s Foreign Ministry hit back at the decision, saying it was unjustified since Warsaw had made amendments to the reforms in 2018 in order to address EU concerns.

Under the amendments, the new compulsory retirement age for judges was made the same for men and women, slowing down the process of retiring current judges.

The European Commission said the ECJ had made “an important ruling in support of the independence of the judiciary in Poland and beyond”. It added: “We stand ready to support the Polish government and to continue discussions on the resolution of all other outstanding issues related to the rule of law in Poland.”

Should Poland fail to align itself with the ECJ ruling, the Commission could file another request to levy a fine against Warsaw in the months to come.

Critics say the aim of the reform was to allow the PiS to replace judges with political appointees to gain greater control over the judiciary. The PiS has said it wanted to improve the efficiency of the justice system and remove residue from Poland’s Communist era.