The 'freedom of assembly' bill gives officials the power to ban counter-demonstrations that take place within 100 meters of a rally deemed to be of national importance by state authorities. Under Poland's current rules on demonstrations, local authorities give precedence to whichever organization filed the first request to stage a rally or protest.

The opposition denounced the ruling as illegal, citing concerns over the composition of the constitutional court.

"Today's proceedings are a violation of the right to a fair trial," said Michal Szczerba, a member of parliament from the largest opposition party Civic Platform (PO).

- Polish abortion laws provoke mass Women's Day protests

- Dispute between Poland and the EU continues

Others say the new law could be used to restrict unwanted protests by a government that has been accused by the European Commission of undermining the rule of law and democracy in Poland.

The nationalist Law and Justice (PiS) government has already passed several laws that make it more difficult for the court to challenge new legislation.

The ruling obliges President Andrzej Duda, a close ally of PiS, to sign the bill into law. Duda had at first refused and sent it to the Constitutional Tribunal, which remains hobbled after 16 months of squabbling between PiS, PO, the European Commission and groups in civil society.

The Committee for the Defense of Democracy (KOD) was set up in late 2015 to coordinate opposition to what is sees as government attacks on the constitution, media, education and other areas of public life, such as the right to abortion.

Mateusz Kijowski, the frontman of the KOD, has accused PiS of trying to subvert Poland's constitutional tribunal and public media.

Polish president Andrzej Duda handed over the chair of the Constitutional Court to Julia Przylebska

A politicized judiciary?

PiS-appointed judges had earlier excluded three other judges who had been chosen by the previous parliament from ruling on the case. The three were excluded following a complaint by Justice Minister and Prosecutor General Zbigniew Ziobro and had been expected to vote against the bill.

Another judge appointed by the previous parliament, Stanislaw Biernat, was sent on compulsory leave by the PiS-appointed head of the tribunal, Julia Przylebska (pictured above with president Andrzej Duda), who argued Biernat had amassed a large number of unused days off.

Only eleven out of 15 judges, therefore, ruled on the bill, which passed with the backing of seven, all of whom were PiS-appointees.

Three of the four judges who opposed the bill were appointed by the previous parliament.

Przylebska said at a news conference that the composition of judges was legal.

Critics cry foul

The European Commission has chastized Warsaw since late 2015 for failing to resolve an ongoing constitutional crisis, but has so far failed to take action.

The EU in December gave the government another two months to reverse changes it made to Poland's constitutional court or face sanctions, warning they posed a "substantial" challenge to the rule of law. So far, no changes have been made.

"What started out in late 2015 as a tit for tat spat between opposing politicians as to the political balance of the Constitutional Tribunal developed into something more serious in 2016, with the government effectively deciding to ignore the rulings of the Tribunal," Nicholas Richardson, a British lawyer practising in Warsaw told DW.

"This is the body which rules on whether laws are in accordance with the constitution and if it is unable effectively to perform this vital task, there are profound implications for the rule of law and checks on the arbitrary exercise of power in Poland," Richardson said.

Watch video 01:24 Share Anti-government protests in Poland Send Facebook google+ Whatsapp Tumblr linkedin stumble Digg reddit Newsvine Permalink https://p.dw.com/p/2UYwS Anti-government protests in Poland

14 more years?

In an interview for the commercial news website Onet.pl published on Friday, Kaczynski said his party would rule for many years.

Asked if the legal instruments being crafted to ease PiS' governance could not also be used against it in the event of another party gaining power, the PiS leader said "we will govern long." When reminded that Deputy PM Mateusz Morawiecki had said recently that PiS could rule until 2031, he smiled: "he is a defeatist."

As sociologist Andrzej Rychard told DW, the PiS program has not been fully articulated "and its basic directions can be inferred rather from the observation of concrete actions and decisions than from reading documents about its program."

jbh/rt (Reuters, AFP)