In a rally at the Presidential Palace, demonstrators wielded Polish and European Union flags, held posters saying "constitution" and "I love and understand freedom," and shouted "we want a veto," "free court" and "free Poland."
After the throng dispersed, many continued their protests at other locations, in front of the High Court and at the Sejm, Poland's lower house of parliament.
Critics have slammed the legislation's passage as a blatant power grab by President Andrzej Duda and his right-wing Law and Justice Party (PiS), but the party insists it is simply carrying out needed judicial reform.
Key to the legislation is that current Supreme Court judges would be forced into early retirement and new judges would be appointed by the Justice Ministry.
The President has 21 days to sign or veto the legislation. He is widely expected to approve it, but protesters are calling on him to reject it.
Parliament's upper house, the Senate, approved the bill just before 2 a.m. on Saturday
after 16 hours of debate, sparking mass protests in more than 100 cities across the country and a wave of condemnation from abroad. The lower house
voted for the measure on Thursday.
The move to control one of the last remaining independent government institutions has prompted concern in Washington and triggered warnings from the European Union that it is putting judicial independence at risk.
The bill's passage could mark a turning point for the Eastern European country, one of the first former communist nations to join the European Union.
A poll conducted by CNN affiliate TVN
found that 55% of Poles said Duda should veto the court laws; 29% said he should not.
Clock starts ticking
Adam Bodnar, Poland's human rights ombudsman, described the law as the most important decision of Duda's term.
He and other critics of the bill admit the judiciary needs reform but disagree about the way in which the PiS has gone about it.
"It is a situation (where) you should repair your house, mend windows, paint walls, seal the leaking roof," said Bodnar. "But you should not put explosives under foundations of the house."
Since coming to power, the Law and Justice party has eroded other institutions and freedoms: The right to peaceful assembly has become more restricted, and new media laws have made it more difficult for the press to operate independently.
'Dangerous consequences,' EU warns
A top EU official earlier this week threatened the use of Article 7, a mechanism that would allow for sanctions against Poland and possible suspension of its voting rights in the bloc. The measure has never been used before.
"Each individual law, if ado