Trespassing anti-coal seam gas advocates face heavier fines and greater jail sentences with tough new anti-protest laws passing through NSW parliament.

With the support of the Shooters and Fishers party and Christian Democrat Fred Nile, the controversial legislation was passed 20-16 in the upper house on Wednesday after minor amendments to the original proposal.

The bill gives police greater powers to search without a warrant, seize items and move protesters on, while fines for illegal entry to mining and CSG sites have increased tenfold from $550 to $5500.

Anti-CSG protesters who interfere with gas sites – including those who chain themselves to machinery – will also be exposed to a maximum jail sentence of seven years.

The Greens MP Jeremy Buckingham, who along with Labor voted against the legislation, condemned the changes as a “jackboot police crackdown on democratic rights”.

The Labor MP Adam Searle also spoke out against the bill’s “sinister” provisions.

“This legislation strikes at the heart of a fundamental aspect of our society – the right to peacefully protest,” he told parliament during hours of fierce debate.

But the premier, Mike Baird, defended the legislation, saying he didn’t believe it was too harsh.

“It’s quite simple, peaceful protests are fine,” Baird said. “Anyone that wants to disrupt a business or ultimately act illegally and puts the lives of themselves and others at risk, well we’ve put these measures in and I think it’s appropriate.”

About 500 protesters shut down a part of Sydney’s CBD to rally against the proposed changes on Tuesday.

A Reachtel poll commissioned by the NSW Nature Conservation Council this week also showed 61.4% of people opposed increasing police powers and fines for protest action.

The NSW Law Society said lawyers were concerned the legislation could seriously interfere with people’s human rights liberties.

Meanwhile, the NSW Unions movement says it’s considering launching a high court challenge against the laws.