Several hundred people protested in Warsaw after Poland's Senate adopted two judicial bills that the opposition says are an attempt by the ruling conservative party to undermine the separation of powers.
Chanting "Freedom! Equality! Fraternity!" protesters on July 15 rallied the outside of the presidential palace and called on President Andrzej Duda to veto the legislation.
The Gazeta Wyborcza newspaper said the demonstration was organized by left-wing opposition parties and citizen committees.
The first bill awaiting Duda's signature stipulates that the parliament -- now controlled by the right-wing Law and Justice (PiS) party -- will choose members of the National Council of the Judiciary (KRS), whose role is to protect court independence.
The second bill gives the authority to name the justices of the Supreme Court to the minister of justice.
The bill also states that current Supreme Court judges will be forced to retire, except those chosen to stay by the justice minister.
The opposition claims the bills will wipe out judicial independence and violate democracy and the rule of law in Poland, which is a member of the European Union and NATO.
Senior members of the European Parliament said the legislation was a setback for the country's judicial independence.
Manfred Weber, who heads the European Parliament's mostly Christian Democratic and center-right EPP grouping, said the PiS "is putting an end to the rule of law and leaving the European community of values."
Jaroslaw Kaczynski, a lawyer and head of the PiS, defended the action, saying "radical changes" are necessary to fix the nation's judiciary system.
He said the judiciary has not been reformed since communist times, is inefficient, and needs an infusion of younger personnel.
Overnight on July 14-15, dozens of people blocked the entrance into the Polish parliament, and police reported that 31 people were temporarily detained.
With reporting by dpa, AP, AFP, and the BBC