WARSAW (Reuters) - Poland’s ruling party on Saturday dismissed growing concern from key allies including the EU and United States and protests at home by approving an overhaul of the Supreme Court that critics say will undermine judicial independence.

As mass demonstrations continued in cities across the country, senators of the right-wing Law and Justice (PiS) party agreed in the early hours of Saturday to a bill that would remove all Supreme Court judges except those hand-picked by the justice minister.

The overhaul of the judiciary, coupled with a drive by PiS 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 daily since Wednesday, demanding that President Andrzej Duda, a PiS ally, veto the bill. Peaceful demonstrations continued on Saturday evening in dozens of cities, including Warsaw, Krakow and Poznan.

Hundreds of protesters gathered at the Warsaw villa of PiS head Jaroslaw Kaczynski, Poland’s de facto leader, who holds no government post.

The opposition and most legal experts say the government’s overhaul violates the Polish constitution.

But the government has stood firmly by its plan despite accusations that it is heading toward 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, which Brussels says would put courts under direct government control, or risk sanctions.

“Today the strategic direction toward the West that we had chosen is being reversed,” European Council President and former Polish premier Donald Tusk told TVN24 television on Friday.

Slideshow ( 15 images )

U.S. Senator John McCain said on Twitter that passing of the Supreme Court bill was “one step back for #democracy” in Poland.

CONCERNS

The United States, Poland’s most important ally in NATO, also expressed its concerns.

“We urge all sides to ensure that any judicial reform does not violate Poland’s constitution ... and respect the principles of judicial independence and separation of powers,” the U.S. Department of State said in a statement.

Poland’s foreign ministry dismissed those worries.

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

The largest U.S. and British organizations of lawyers have disagreed, a stance mirrored by top judges in the Czech Republic, Slovakia, Estonia and other countries.

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”.

Slideshow ( 15 images )

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

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

In neighboring Germany, Justice Minister Heiko Maas said the independence of Poland’s judiciary was at risk, adding that he welcomed the European Commission considering sanctions.

“Those who show so little respect for the rule of law run the risk of isolating themselves politically”, he warned in German newspaper Bild am Sonntag.

So far only Poland’s fellow eurosceptic government in Hungary has said it will stand by Warsaw against the threat of EU sanctions.

PRESIDENT’S CALL

An opinion poll for private television TVN showed on Friday that 55 percent of respondents said Duda should veto the judicial overhaul, while 29 percent wanted him to sign it.

Another poll, conduced after the Supreme Court bill was approved, showed that support for PiS falling by 4 percentage points to 32 percent compared to last month.

Duda’s spokesman said on Saturday the president believed there was an inconsistency in the bill, but stopped short of saying what Duda would do. The president can sign a bill into law, veto it or send it to the constitutional court for checks.

Duda, currently on holidays at the Baltic coast, will meet the head of the Supreme Court on Monday.

Earlier this week, Duda demanded that new Supreme Court justices be selected by a panel composed mostly of judges chosen by a three-fifths parliamentary majority. PiS lawmakers agreed to introduce that change.

Since coming into power in 2015, the PiS has sought to tighten government influence over courts, and brought prosecutors and state media under direct government control. It has also introduced some restrictions on public gatherings.

But the party has remained broadly popular among the electorate. Poles generally have little trust in the judicial system, which they consider ineffective because even simple cases can last years.

With the economy growing robustly and unemployment at record lows, the party’s nationalist rhetoric infused with Catholic piety resonates strongly among Poland’s conservative voters.