WARSAW, Poland — A legislative package that would have put Poland’s judicial system under the control of the country’s governing party has sparked mass protests across the country. Critics who argued that it would give politicians undue influence victory over judges secured a victory Monday when President Andrzej Duda said he would veto two of the package’s three bills.

The president’s move represents a major setback for the ruling Law and Justice party and its plans for sweeping “good change” to the justice system and in other areas of the nation’s life.

The latest developments and background:


THE LATEST

Duda says he will veto two contentious bills recently passed by lawmakers that are widely seen as assaults on judicial independence in Poland.

In announcing his decision, the president broke openly for the first time with Law and Justice party leader Jaroslaw Kaczynski. Duda is closely aligned with the conservative party and has supported its agenda since taking office in 2015.

One of the bills would have put the Supreme Court under the political control of the ruling party, giving the justice minister, who also serves as prosecutor general, the power to appoint judges. Duda said a prosecutor general should not have such powers.

The other bill the president plans to reject would have given lawmakers greater power over court appointments.


THE BACKGROUND

Experts agree that Poland’s judicial system needs to be made faster and more efficient, but the changes Law and Justice proposed drew condemnation from the European Union and has provoked days of massive protests.

The three separate bills reorganize the work of the judiciary. The Supreme Court bill, which the ruling party submitted to parliament earlier this month without having sought public opinion, was the most contentious.

The bill also called for the dismissal of the court’s current judges, except for those chosen by the president; rearranged the court’s structure and added a Disciplinary Chamber that would handle breaches of rules or ethics in the justice system.

Prime Minister Beata Szydlo appeared on national television to defend the changes as opponents of her government urged the president to reject them.

European Union president, Donald Tusk, Poland’s former prime minister, appealed to President Duda for a meeting to seek ways out of the situation that, he said, went against EU values and would be destructive to Poland’s international image.


THE PROCEDURE

The speed at which the party pushed the legislation through parliament was another subject of suspicion and criticism. It was approved by both chambers last week, disregarding the massive opposition.

The legislation was proposed late on July 12 by Law and Justice lawmakers and was immediately put on the parliament agenda.

The ruling party has a comfortable majority in both houses of parliament — the Sejm and the Senate — which allowed lawmakers to get it to the Senate for final approval on July 22.

In the process, the co-author and lead promoter of the package, Sejm member Stanislaw Piotrowicz, summarily rejected some 1,300 amendments proposed by the opposition.


THE PLAYERS

Ruling party leader Kaczynski and Justice Minister Zbigniew Ziobro backed the overhaul. They argued that Poland’s justice system was never properly purged of ex-communists and that ordinary citizens often felt that justice wasn’t on their side.

The fractured Polish opposition is weak and challenges Law and Justice chiefly by joining public protests.

European Union leaders have criticized Law and Justice policies ever since the party took control of another top court, the Constitutional Tribunal, after it assumed power in 2015. European Commission Vice President Frans Timmermans warned last week that Brussels was close to taking steps to strip Poland of its voting rights in the EU for violating fundamental principles such as the separation of powers and laws applying to both the governed and the government.

The biggest player turned out to be the tens of thousands of ordinary Poles who have participated in more than a week of daily protests to show their displeasure with the judicial changes and with the general direction Law and Justice is taking the young democracy.

____

THE RESPONSE

Duda said he will use his legislative power to propose a new and improved law, as he shares the view that Poland’s justice system needs reforms.

The current package now goes back to parliament, which could override Duda’s vetoes if the ruling party can muster a three-fifths majority in the lower house. However, it only has a slim majority in the Sejm and is unlikely to get the support of any other parties.

Former President Lech Walesa and opposition leaders also want Duda to veto the third bill in the package, which would allow the justice minister to appoint the heads of lower courts. More protests are planned urging him to block that bill, too.