Poland's ruling party today dismissed a growing wave of criticism from key allies and worries at home by approving an overhaul of the Supreme Court that its critics say will undermine judicial independence.

Amid mass protests, senators of the right-wing Law and Justice (PiS) party agreed in the early hours of today to a bill that would remove all Supreme Court justices except those hand-picked by the justice minister.

The overhaul of the judiciary, coupled with the ruling party's drive to expand its powers in other areas, has provoked a crisis in relations with the European Union and sparked one of the biggest political conflicts since Poland overthrew communism in 1989.

Tens of thousands of protesters have gathered across Poland for candle-lit vigils each day since Wednesday, demanding that President Andrzej Duda, an ally of the PiS, veto the bill.

The opposition and most legal experts in Poland say the government's overhaul violates the constitution.

Poland protests
Protester calling for free courts light candles at the Lithuanian Square in Lublin, Poland

But the PiS government has stood firmly by its plan despite accusations that it is heading towards authoritarian rule. The PiS says the changes are needed to ensure courts serve all Poles, not just the "elites".

The European Union's executive on Wednesday gave Poland a week to shelve the judicial reforms that Brussels said would put courts under direct government control, or risk sanctions.

"Today the strategic direction towards the West that we had chosen is being reversed," European Council President and former Polish premier Donald Tusk told TVN24 television yesterday.

The United States, Poland's most important ally in NATO, called on Warsaw to make sure that any changes respect the constitution.

"We urge all sides to ensure that any judicial reform does not violate Poland's constitution ... and respects the principles of judicial independence and separation of powers," it said in a statement.

The Polish foreign ministry said today it was "surprised" that the United States has decided to voice concerns.

"The fact that the legislative process is still under way makes any such pronouncements premature," the ministry said, adding that the bill protected judicial independence.

The largest US and British organisations of lawyers disagreed, a stance mirrored by top judges in the Czech Republic, Slovakia and Estonia.

Chair of the Bar of England and Wales, Andrew Langdon, said he had asked the Polish president to veto "new legislation that will undermine the independence of the Polish judiciary".

"Judges must be independent. History tells us that justice is not done well when it is influenced by political turbulence and populism," Mr Langdon said.

The European Network of Councils for the Judiciary has said the situation in Poland is "very grave".

So far only Poland's fellow eurosceptic government in Hungary, led by Prime Minister Victor Orban, has said it will stand by Warsaw against what he called an "inquisition offensive" in the European Union.