Controversial anti-protest laws and tightened gun restrictions have cleared their final hurdles despite opposition, but civil liberties groups have vowed to challenge the former.

NSW Premier Chris Minns succeeded in pushing through legislation to cap gun ownership, limit magazine capacity and tighten regulation around gun licences following the Bondi terrorist attack that killed 15 people.

The marathon debate in the Legislative Council ended close to 3am (AEDT) on Christmas Eve.

Omnibus legislation spanning gun reform, protest restrictions and hate speech crackdowns passed 18 to eight votes after a two-day emergency session of the NSW Parliament.

The reforms were supported by the Liberals but not the Nationals, who oppose further firearm restrictions.

Police powers to prevent public gatherings after a terrorist event also passed but will face a legal challenge as opponents brand it draconian and an overreach.

Public assembly can be restricted for up to 90 days following a terrorist incident.

Palestine Action Group and Jews Against the Occupation are challenging the protest provisions in court.

"These laws will take away the rights of everyone in NSW to gather together as a community to express their views," Josh Lees from the action group said.

Mr Minns said he was confident the laws would withstand the legal challenge.

But even members of Mr Minns' back bench spoke out against the crackdown in parliament, with Anthony D'Adam and Stephen Lawrence calling it disproportionate.

Mr Lawrence said the ban could lead to violence if the pressure valve of peaceful protesting is removed, essentially creating a pressure cooker.

"This could go so wrong," he said.

Two independent state MPs from the Central West expressed separate concerns about the legislation this week.

In a statement on Wednesday morning, Member for Orange Philip Donato recognised that the "devastating terrorist attack at Bondi Beach 10 days ago has shaken the nation and left Australians demanding answers". He added, however, that "instead of confronting the catastrophic failures of intelligence and firearms licensing systems, the NSW Government is rushing through sweeping gun law reforms that punish law-abiding citizens while sidestepping accountability".

Member for Barwon Roy Butler said on Tuesday that he tried to amend and delay the NSW government’s rushed laws, saying "they don’t address the circumstances behind the attack while unfairly penalising regional people".

Mr Butler said he tried to amend the laws to remove the cap on firearms for sports shooters and to grandfather existing license holders so they can keep the firearms they already legally own. He also asked for the Bill to be split so the new protest laws could go through, but the firearms restrictions could be referred to a parliamentary committee for further consideration.

- additional reporting by our Local Newsroom