Defying Brussels, Poland's parliament on Friday passed a law punishing judges critical of controversial court reforms, a measure the governing conservatives say is necessary to avoid judicial chaos but that the opposition calls a threat to the rule of law.

The vote came just a few hours after the European Commission called on Warsaw to put off on approving the draft law until it had consulted with international experts.

The legislation passed the lower house of parliament with 233 votes in favour, 205 against and 10 abstentions.

It was prepared in haste by the governing right-wing Law and Justice (PiS) party in response to rulings by the European Court of Justice (CJEU) and the Polish Supreme Court, which called into question various judicial reforms introduced by the conservatives.

Justice Minister Zbigniew Ziobro on Thursday said the bill "protects and restores a normal state of affairs in Poland's justice system."

"This law protects the democratic rule of law against the 'judiocracy' that some are trying to usher in through a trapdoor, triggering chaos, anarchy and illegality," he said.

"We're not sure who is a judge, because every judge can be contested. We're not sure which ruling was handed down, because every ruling can be challenged. Public interests count for nothing because what matters are the interests of a special caste (of judges)."

After it was introduced, critics said the bill put judicial independence at risk and it triggered street protests across the country. Judicial experts in parliament also called the legislation into question.

The document was amended but according to the approved version judges could still lose their jobs for challenging the competence of magistrates appointed by a body which opponents say lacks independence.

A few hours before the vote, European Commission Vice-President Vera Jourova warned Polish authorities over the bill, urging Warsaw not to breach European legal norms.

She called on Poland to first consult the Council of Europe's Venice Commission -- which advises countries on bringing their laws into line with EU requirements -- about the proposed legislation.

Protesters have taken to the streets over the judicial reforms
Protesters have taken to the streets over the judicial reforms AFP / Wojtek RADWANSKI

Jourova wrote a letter to the Polish president, prime minister and parliamentary speakers to set out the EU's concerns.

"(She) invites all state organs not to take forward the proceedings on the new draft legislation before carrying out all the necessary consultations with all stakeholders," Commission spokesman Christian Wiegand told reporters.

The spokesman for the UN human rights office, Rupert Colville, also on Friday expressed "concern" over the draft legislation, which he said "risks further jeopardising the independence of the judiciary in Poland."

Poland's Ombudsman Adam Bodnar for his part said the draft act "violates the Constitution and the ground rules of the rule of law."

The document "would definitively put Polish courts and judges under the control of the legislative and executive branches of government," Bodnar added.

On Wednesday, thousands of Poles protested against the bill in around 100 cities across the country.

The Supreme Court had on Tuesday warned the proposed rules would "very likely" lead to Poland being punished by the EU for failing to respect its treaty commitments.

If the government refused to back down, the country could eventually have to leave the bloc, it added in the 40-page statement.

The senate still needs to approve the legislation for it to come into force.