WARSAW (Reuters) - Poland’s president and its ruling party have reached a compromise on judicial reform, a parliamentary deputy said on Friday, bringing them closer to resolving an issue that has kept them at odds for more than three months.

Poland's President Andrzej Duda speaks during a media announcement regarding judiciary reform at Presidential Palace in Warsaw, Poland September 25, 2017. Agencja Gazeta/ Slawomir Kaminski via REUTERS

The government and President Andrzej Duda have been negotiating since July, when Duda unexpectedly vetoed legislation backed by the ruling Law and Justice (PiS) party to overhaul the Polish court system.

“We’ve reached a preliminary agreement ... I hope that in late November we could discuss the project in parliament,” PiS parliamentary deputy and negotiator Stanislaw Piotrowicz said on Friday.

The proposals vetoed by Duda would have immediately removed all current Supreme Court judges unless they had the approval of the justice minister. Parliament would have gained the right to name most of the National Council of the Judiciary, which would nominate future candidates to preside over the Supreme Court.

By giving parliament effective control over appointing - and sacking - senior judges, the proposals raised alarms in the rest of the European Union, of which Poland is a member. The EU said they undermined the independence of the courts and threatened the rule of law.

The proposed compromise would still give parliament the right to name members of the National Council of the Judiciary, but that would require a three-fifths majority in the lower house of parliament, Piotrowicz said. Opposition parties would gain the right to propose judges, too.

If candidates failed to gain approval, they could be chosen by a simple majority, he said.

The PiS says the judicial system needs to be reformed because the courts are slow, inefficient and steeped in a communist-era mentality.

Duda’s veto of parts of the reforms and his proposed limits on its authority over the court system created a stalemate that could have stalled the party’s plans to reform not just the courts but the media and the electorate system as well.

The compromise announced today still needs to be approved by the president and the leadership of PiS.