WARSAW (Reuters) - The head of the European Union’s judicial advisory body visited Poland on Friday in support of the forcibly retired chief justice of Poland’s Supreme Court, saying an overhaul of the judiciary by Warsaw’s government was endangering democracy.

People protest against the conservative government's makeover of the Polish judiciary in Warsaw, Poland July 3, 2018. Agencja Gazeta/Dawid Zuchowicz via REUTERS EDITORIAL SALES IN POLAND. TPX IMAGES OF THE DAY - RC1B239451B0

Kees Sterk, chief of the European Network of Councils for the Judiciary (ENCJ), which advises the EU’s executive on upholding rule of law in the bloc, spoke after meeting Judge Malgorzata Gersdorf in her Warsaw office.

“We’re here to express our concerns about the situation, about the independence of judges, independence of the Supreme Court,” Sterk told reporters.

Gersdorf has refused to accept her retirement, saying her mandate should only expire in 2020 and cannot be cut short by the government.

Her refusal to heed a law mandating the makeover of the judiciary makes her a central figure in the stand-off with the government, and the situation threatens to paralyze the Supreme Court.

“We also support judges who are brave enough to defend the independence,” Sterk said. “At stake is in the end the liberty of citizens of Poland.”

Poland’s ruling nationalists have carried out broad judicial reforms despite criticism by the opposition, the EU, rights groups and international agencies that they undercut the rule of law in the largest ex-communist EU state.

The EU has launched an unprecedented punitive procedure against Warsaw over the reforms, which the ruling Law and Justice (PiS) party says are needed to free the judiciary of communist-era thinking and practices.

The latest stage of the reforms enacted this month forces into early retirement more than a third of the judges at the Supreme Court, which validates election results in Poland. New ones would be named by the president, a PiS ally.

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