WARSAW (Reuters) - Poland’s President Andrzej Duda has declined to sign the government’s freedom of assembly bill into law in the first such rejection since the Law and Justice party (PiS) took power in November last year.

Polish President Andrzej Duda speaks during a ceremony marking the 60th anniversary of 1956 anti-Communist uprising in Budapest, Hungary, October 23, 2016. REUTERS/Laszlo Balogh

The bill aims to provide a legal basis for prioritizing rallies deemed by the authorities to have national importance -- such as historical anniversaries -- over other demonstrations and gatherings.

However, it has come under fire from the Supreme Court and rights groups, who have said the bill would violate Poles’ constitutional rights, and a statement from the president’s office on Thursday said that Duda has sent it for examination by the constitutional court.

“President Andrzej Duda believes that the freedom of assembly is an necessary element of democracy and a condition for exercising other freedoms and human rights connected with the public sphere,” the statement said.

“If the bill came into force, it could result in norms supporting the exercise of the constitutional freedom of assembly to cease to function properly.”

Duda is a close ally of the PiS, which approved the bill this month as part of a wave of legislation that the government says is aimed at strengthening traditional Catholic and national values.

The constitutional court will now determine if the bill is in line with the constitution.

Earlier in December Duda replaced the outgoing head of the constitutional court after the party passed new legislation on the functioning of the court.

The European Commission has said the new legislation is at odds with the EU’s democratic values and that it weakens judicial independence in Poland.

PiS faced mass street protests this year against its actions relating to the constitutional court and a bill that would have almost completely outlawed abortion. The parliament later dropped the abortion bill.