WARSAW, Poland — Poles protested in cities and towns across Poland for the eighth day Sunday over new rules passed by the ruling party that would drastically limit the independence of the judiciary.

Protesters see moves by the populist governing Law and Justice party as an assault on the country’s democratic system of checks and balances, accusing party leader Jaroslaw Kaczynski of behaving in an authoritarian way to cement his power.

People waved flags of the European Union and Poland as they gathered in the evening in front of the presidential palace and the Supreme Court in Warsaw. They called on President Andrzej Duda to veto three contentious bills that would put the Supreme Court and other areas of the judiciary under the party’s control.

People chanted slogans, including “Constitution!” and “Freedom, Equality, Democracy!” Protests also took place in Krakow, Wroclaw and other Polish cities, with smaller protests in Paris, Brussels, London and elsewhere in Europe.

The legislation quickly passed both houses of parliament in recent days and now awaits Duda’s signature to take effect.

One element of the law on the Supreme Court would call for the immediate dismissal of all the Supreme Court’s judges, with their replacements to be chosen by the justice minister, who is also the prosecutor general.

The ruling party says its moves are meant to reform corrupt courts never properly purged of former communists after communism fell in 1989. The party, which won elections in 2015 with about 38 percent of the vote and has maintained that level of support in polls, says it has a mandate to clean up the country.

But the moves to take control of the courts have alarmed the European Union, with Frans Timmermans, the vice-president of the EU’s executive, warning last week that Brussels is very close to taking steps to strip Poland of its voting rights in the bloc over rule of law violations.

Germany’s Justice Minister Heiko Maas on Sunday welcomed possible EU sanctions, telling the weekly German paper Bild am Sonntag that “the independence of the judiciary is in danger in Poland.”

“Somebody who gives so little respect to the rule of law has to accept that he isolates himself politically,” Maas said.

He added that “the EU cannot stand and watch inactively. Rule of law and democracy are the bedrock of the EU.”

However, it’s not clear if sanctions could pass because Hungary’s illiberal Prime Minister Viktor Orban has pledged to defend Poland against the EU’s “inquisition.”

____

Kirsten Grieshaber in Berlin contributed.