Poland's governing party has moved to reinstate Supreme Court justices whom it had forced into early retirement.
It follows last month's ruling by the European Court of Justice (ECJ) which ordered that Poland suspend the application of its new law.
The government lowered the retirement age of judges earlier this year, forcing many to quit.
Critics said the law helped give the Law and Justice Party political control of the Supreme Court.
But the government argued that the reforms - which triggered mass street protests - were needed to make the court more efficient and remove judges appointed during the communist era.
The Law and Justice Party (PiS) has already appointed the majority of judges to the Constitutional Tribunal, which has the power to veto legislation, and also controls the body that nominates all judges in Poland.
What did the government say?
On Wednesday, the PiS said it was reinstating the judges because it respected the rulings of the EU's top court.
"We are fulfilling our obligations," Justice Minister Zbigniew Ziobro told MPs.
The legislative amendment, which retains the lower retirement age for newly appointed Supreme Court judges, is now being fast-tracked through parliament.
The government says it wants to resolve its dispute with the European Commission over a whole package of changes it has made to Poland's courts over the past three years.
What was the law?
The Supreme Court law was introduced in July and since then more than 20 judges - about of third of the total - have been forced to retire. Following Wednesday's amendment they will be able to return to work.
Chief justice Malgorzata Gersdorf, who was 65, refused to stand down, arguing Poland's constitution guaranteed her the right to serve a six-year term. She branded the reforms a "purge".
Not that much of a defeat
Analysis by Adam Easton, BBC News, Warsaw
The government says it wants to resolve the protracted dispute with the European Commission over the substantial changes it has made to Poland's courts over the past three years. It is a victory for the Supreme Court chief justice, Professor Malgorzata Gersdorf, her retired colleagues and the European Commission.
But it's not much of a defeat for the governing Law and Justice camp's judicial reforms. It has already managed the appointment of the majority of judges to the Constitutional Tribunal, which has the power to veto legislation. The justice minister, who also serves as the prosecutor general, now has the power to appoint and dismiss the deputies and heads of ordinary courts. And the governing camp also now controls the National Council of the Judiciary (NCJ), the body that nominates all judges in Poland.
Plus, by reinstating the Supreme Court judges, the government will avoid the possibility of having to pay hefty daily fines for non-compliance with last month's ECJ ruling. In a few years time, those reinstated judges will retire. In the meantime, dozens of new judges for two new Supreme Court chambers created by Law and Justice will need to be appointed and they will be nominated by the newly politicised NCJ.
What did the EU say?
The European Commission - the EU's executive arm - argued that the reforms undermined the rule of law because they gave the governing party political control of the judiciary.
It referred the matter to the Luxembourg-based ECJ which in October ordered Poland to "immediately suspend" the application of its law.
The court ordered Poland to reinstate the judges who had been forced to retire.
The ECJ said its decision was an interim measure in response to the commission's request and a final ruling would be issued at a later date.
At the time, the head of the PiS, Jaroslaw Kaczynski, said the government would comply with the decision.
"We are members of the European Union and we will abide by European Union law," he said.