By Anna Koper and Lidia Kelly
WARSAW (Reuters) - Thousands rallied in Poland's largest cities on Sunday in protest against the ruling party's judicial reforms, which the opposition says would kill the judges' independence and undermine democracy.
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-factor 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 there, but the Warsaw city hall said the number was above 10,000.
In the evening several thousand people gathered in front of the Supreme Court building next to Warsaw's historic center, holding candles in a peaceful protest "in defense of courts and democracy".
Increasingly isolated from its Western allies in the European Union, PiS has been accused by critics of a tilt towards authoritarianism.
The Supreme Court building stands in Krasinski Square, site of the Warsaw Uprising monument and where U.S. President Donald Trump said in early July Poland and the United States shared a "commitment to safeguarding the values (of) freedom, sovereignty and the rule of law".
Smaller protests took place also on Sunday in Krakow, Katowice and other Polish cities.
(Writing by Lidia Kelly; Editing by Greg Mahlich)