A simple legal error has resulted in the NSW government's new land-clearing laws being ruled invalid by the courts.
The NSW Land and Environment Court declared the government's land clearing codes invalid on Friday after it emerged Primary Industries Minister Niall Blair failed to follow due process during their creation.
Mr Blair did not obtain concurrence from Environment Minister Gabrielle Upton before making the codes, which is required by law, according to environmental groups.
The codes, which were introduced in 2017, allowed landowners to clear sections of native bushland on their property without prior environmental assessment.
Environmental groups, which at the time accused the government of throwing biodiversity laws out the window, have welcomed the court's decision.
"Today's ruling is an embarrassing admission of failure by the Berejiklian government and a great victory for the rule of law and the thousands of people who have supported us in taking this action," Nature Conservation Council chief executive Kate Smolski said in a statement.
"These laws were made against the advice of the scientific community and against the wishes of the vast majority of the many thousands of people who made submissions."
A spokeswoman for Mr Blair said the government remained "absolutely committed" to pushing through the reforms.
"The NSW government is now moving quickly to respond to Court's declaration and its top priority is providing legal and operational certainty to ensure the benefits of the reform continue to be realised," the spokeswoman said in a statement.