WARSAW (Reuters) - Polish Prime Minister Mateusz Morawiecki criticized his country’s Supreme Court on Friday, saying Communist-era judges still worked there, in comments likely to irk the EU ahead of a deadline for settling a row over court independence.

Slideshow ( 2 images )

The EU’s executive Commission has given Morawiecki’s right-wing government until late June to resolve the dispute over reforms that Brussels says threaten judicial independence. It has threatened to cut Poland’s access to generous EU funds.

The European Commission’s First Vice President Frans Timmermans is due to visit Warsaw on Monday to try to convince the government to reverse its reforms of the judiciary.

“There are still judges in the Supreme Court dating back to martial law. And present judges from the Supreme Court were issuing shameful sentences against freedom and democracy fighters,” Morawiecki told a Polish-French economic forum.

Poland’s Communist government declared martial law in 1981-83 in an attempt to suppress the country’s pro-democracy movement. Poland threw off Communist rule in 1989 and joined the EU in 2004.

At the start of July, 39 percent of Supreme Court judges will retire under broader reforms that the ruling Law and Justice (PiS) party says will make the courts more efficient and free from the Communist legacy.

A Supreme Court spokesman dismissed suggestions of political bias among its judges.

“All judges appointed to the Supreme Court since the transformation (of 1989) have undergone a thorough vetting process and meet the standards that should be met by a judge adjudicating in a free Poland,” he said.

The Commission has triggered the so-called Article 7 of the EU treaty over the judicial reforms, which could end in Poland losing its voting rights, though its ally Hungary has said it would veto any such move.

Last week, Nobel peace laureate and former Polish president Lech Walesa, who led the strikes that shook Communist rule in the 1980s, backed efforts to reverse the reforms of Poland’s judiciary.

In Poland, the Supreme Court decides whether elections are valid. Poland holds national elections next year.

Opinion polls show PiS retaining its lead, thanks especially to generous social program it conducts amid strong economic growth, though its support has waned somewhat.