WARSAW (Reuters) - A long-running dispute between Poland and the European Union over democratic values escalated on Wednesday when new legislation came into force that requires about a third of judges at the Supreme Court to retire.

The EU accuses Poland’s ruling right-wing Law and Justice party (PiS) of trying to control the judiciary and subvert democratic standards. Warsaw says the changes are needed to free the judiciary of communist-era thinking and practices.

The president of the Supreme Court, Malgorzata Gersdorf, defied the new law on Wednesday morning by going to her office as usual, to applause from hundreds of supporters who chanted “constitution” and sang the Polish national anthem.

“My presence here is not about politics, I am here to protect the rule of law,” she told reporters.

Gersdorf is 65, the age at which judges are now required to retire, but a constitutional law expert said she met the conditions to remain in place until her six-year term has expired. Gersdorf became Supreme Court president in 2014.

“The law cannot work retroactively. So this legislation... is clearly unconstitutional... and could lead to paralysis at the Supreme Court,” said the expert, Marek Chmaj.

Addressing the European Parliament on Wednesday in Strasbourg, Polish Prime Minister Mateusz Morawiecki defended his government’s overhaul of the judiciary.

“Each EU state has the right to shape their legal system according to their own traditions,” he said, adding that the EU should focus on external challenges and not wage a “campaign” against the democratically elected government of a member state.

PROTESTS

EU lawmakers gave Morawiecki a rough reception. Maltese lawmaker Roberta Metsola said the judicial reforms were about “consolidating (government) control by weakening the institutions designed to keep you in check”.

After staging protests on Tuesday outside the Supreme Court, Polish pro-democracy activists have vowed to hold more rallies around the country on Wednesday.

But the protest turned out smaller than a crowd of 4,000 people a day earlier, disappointing Lech Walesa, a Nobel Peace Prize Laureate and former president credited with bringing down Polish communism in 1989, who came from Gdansk to Warsaw to express his objection to the court changes.

“With such an amount we will not win much,” Walesa said in front of the protesters outside the Supreme Court building in the centre of Warsaw. “It is getting serious when they ruin our courts. Really, sooner or later this may lead to a civil war.”

Slideshow ( 4 images )

Through legislation and personnel changes, PiS has already taken de facto control of much of the judicial system since taking power in 2015, including the constitutional court and prosecutors, who now report directly to the justice minister.

“We are moving towards a dictatorship,” said Joanna Tworog, a 65-year-old webmaster in the crowd supporting Gersdorf earlier on Wednesday.

“What if I have a court case against someone from PiS and they can influence judges? These changes affect me personally.”

Slideshow ( 4 images )

Critics at home and abroad say the ruling party’s policies, which also include tighter control of public media, amount to a shift towards authoritarian rule.

The conflict has isolated Poland in Europe, where most governments are critical, while also exposing the EU’s inability to rein in governments it believes contradict core EU values.

The European Commission opened a fresh legal case against Poland over the Supreme Court changes on Monday, saying they undermine judicial independence in the largest ex-communist EU member state.

Warsaw faces the theoretical threat of losing its voting rights in the EU under a procedure launched late last year in response to the reforms. But Hungary, also facing criticism over democratic standards, has pledged to block such a move.

The PiS government says EU treaties do not give Brussels institutions the power to influence national matters such as the judiciary.

“The court system ... is an entirely internal matter,” PiS leader Jaroslaw Kaczynski was quoted as saying by Gazeta Polska newsweekly in an article published on Wednesday.

The party’s standing in polls has held steady at around 40 percent throughout the dispute, well above any other rival.