A top court in Poland says rules introduced by the right-wing government that allow lawmakers to choose members of a top judicial body are in line with the constitution.

The verdict Monday by the Constitutional Tribunal backs the government in its bitter dispute with critics who say that only judges have the right to choose members of the Supreme Judicial Council, which safeguards judicial independence and issues opinions on new legislation concerning judges.

The ruling conservative Law and Justice party in 2017 introduced legislation allowing the parliament to choose some of the council members.

Critics say that gives the government control of the council and violates judicial independence.

The EU Court of Justice is analyzing the independence of the council and is to rule in the coming months.