Contentious gun and protest reforms have passed New South Wales Parliament following the Bondi Beach terror attack, after a marathon debate which stretched into the early hours of Christmas Eve.
The bill to tighten gun laws and give police extraordinary powers to restrict protests passed the Upper House 18 votes to eight.
The Liberals voted with the government, while the Nationals voted against it, along with Shooters Party and other crossbench MPs.
The Greens abstained, saying that while they backed moves for stronger gun laws, the restrictions on protests was an "assault on democratic rights."
But they did move a key amendment tightening access to firearms permits for those with suspected terrorist links.
It was the only amendment to be passed with unanimous support across both houses of the parliament during two days of sometime heated debate.
The legislation now goes back to the Lower House to be rubber stamped later this morning.
Under the legislation individual gun owners will be restricted to a maximum of four firearms with exceptions for primary producers, like farmers, and sports shooters who would be limited to 10.
Magazine capacity will also be scrutinised, with the NSW government planning to reduce Class A and B weapons to five to 10 rounds, from its current unlimited capacity.
A stronger vetting process would also be introduced where gun licenses would need to be renewed every two years instead of five years.
The laws will also restrict protest activity and grant police powers to remove face coverings at public assemblies.
At present a police officer can only remove a face covering at a public assembly if they believe an indictable offence is being committed.