Duda had said he’ll approve the measure only if an additional amendment is passed. Under that amendment, the number of votes needed to appoint the judges would be raised to a three-fifths parliamentary majority—a move that could make it more difficult for PiS, or any future government, to force judicial changes. The measure does include that amendment, but its critics say it doesn’t go far enough to ensure judicial independence. The U.S. State Department said it was “concerned” by the measure.

The legislation prompted massive protests, including this week after the Sejm’s vote. It was one of the largest protests in Warsaw since PiS came to power in late 2015. The demonstrations continued into early Friday. Protesters carried both Polish and EU flags, and chanted against the government.

At issue is the composition of Poland’s supreme court. At present, the court’s 83 judges appoint other judges, too, a process that critics say takes too much time and is rife with potential conflicts of interest. The court has the authority to determine the legality of elections and referenda, and to rule on the validity of laws. PiS and its supporters say the court’s judges are elitists and the changes are needed to make the court more accountable. Indeed, an overwhelming majority of Poles have in the past supported a judicial overhaul, citing the slow pace of the system and sometimes controversial rulings, but even political parties that support a judicial overhaul in principle say the government’s effort goes too far. By stacking the court with it allies, they argue, PiS would destroy the independence of Poland’s judiciary and, they say, the move is a naked power grab that’s in line with the government other recent actions. PiS, which was elected in 2015, has tightened its grip on the state media and NGOs. Critics of the measure say the government could use it to force changes to the court’s composition and target individuals, entities, and corporations its views as an opposition. The EU is involved because the separation of powers between the executive and judiciary is enshrined as one of the bloc’s fundamental principles.

Donald Tusk, a former Polish prime minister who is now president of the European Council, wrote to Duda seeking an “urgent meeting.” He called the legislation “a negation of European values and standards … that … put our reputation at risk.”

“Politically, they move us back in time and space—backward and to the East,” Tusk wrote.

Bogusław Kapłon, legal counsel partner at Warsaw’s Domański Zakrzewski Palinka, one of the largest law firms in Poland, told The Wall Street Journal that the measure is “a clear subordination of the courts by authority.”

“The supreme court will become a nice place for talking about nothing, and that’s enough for the ruling party,” Kapłon said.