WARSAW (Reuters) - Thousands rallied in Poland’s largest cities on Sunday against the ruling party’s judicial reforms, which the opposition says would kill the judges’ independence and undermine democracy.

Slideshow ( 8 images )

Late on Friday the country’s parliament, where the Law and Justice (PiS) party has a majority, passed a bill giving parliament a greater say in appointing judges, which critics say violates the constitutional separation of powers.

The conservative, eurosceptic PiS has also introduced draft legislation in the past week that would replace all Supreme Court judges except those chosen by the justice minister.

“Shame, shame” chanted protesters gathered in Warsaw under Polish and European Union flags, and calling Jaroslaw Kaczynski, the chairman of PiS and the country’s de facto leader, a “dictator”.

PiS says the party has a democratic mandate to make the judiciary more efficient and accountable to the public. Since winning the 2015 election the party has overhauled the constitutional court and given the Justice Ministry control over the prosecutor general’s office.

Threatening to take Poland to court, the European Union executive has said these measures undermine democratic checks and balances, a charge PiS denies.

On Sunday opposition leaders urged the protesters to remain in front of the parliament until Tuesday when lawmakers are to debate the Supreme Court bill. Parliamentary opposition leaders vowed they would not allow for the debate to take place.

The country’s fragmented opposition also promised to be more united against PiS.

“Today we know that a great fight has begun and we know we must be together, we know we must fight against them together,” Grzegorz Schetyna, leader of the largest political grouping, the Civic Platform, told the crowd.

Poland’s TVP television, controlled by the state, said the protests and calls to block Tuesday’s debate were “an attempt to organize a coup against a democratically elected power.”

In December Poland saw its biggest political stand-off in years when opposition leaders blocked the parliament’s plenary hall podium ahead of a budget vote, after objecting to plans by PiS to curb media access to parliament.

Protesters on Sunday were cordoned off from the main entrance to the parliament by barricades erected ahead of the demonstrations.

The police estimated that some 4.5 thousand people protested in Warsaw, but the Warsaw city hall said the number was above 10,000. Smaller protests took place in Krakow, Katowice and other Polish cities.

(Refiles to correct error in spelling of ‘de facto’ in paragraph 4)