The NSW deputy premier says mining on the state's fertile Liverpool Plains has been extinguished "forever and a day", prompting praise from farming, agriculture and environmental peak bodies alike.
The NSW government on Tuesday afternoon agreed to pay Chinese-owned mining giant Shenhua $100 million to walk away from its Watermark coal mining project on the Liverpool Plains in mid-north NSW.
It had already agreed in mid-2017 to buy back half of Shenhua's mining licence for more than $262 million in order to protect farming land.
The $100 million makes up the other half of the licence.
Shenhua will withdraw its mining lease application and surrender development consent for the site, and the government will cancel the exploration licence.
The government has purchased 6000 hectares of the land and the rest will be retained by Shenhua and privately sold to other parties.
Deputy Premier John Barilaro admitted on Wednesday that mining proposals on the Liverpool Plains had divided communities and caused grief.
He said the NSW government needed to "find a balance" between key regional industries such as mining, agriculture and horse breeding, and that the black soils of the Liverpool Plains were "prime agricultural land".
Mr Barilaro also said the government was in negotiations with energy company Santos to extinguish gas extraction options on the plains.
"It's the end of this saga - full stop," Mr Barilaro told reporters.
"We have key elements to our industries in the bush ... it's food and fibre and agriculture that's rebuilding our nation's economy."
Mr Barilaro emphasised the government remained committed to coal exploration "in the right areas" and would continue to seek mining investment.
Shenhua said the government's decision "reflects shifting economic and social circumstances since the project first commenced in 2008".
"We appreciate the NSW Government's willingness to work with Shenhua to reach an acceptable financial outcome," the company said in a statement.
Both agricultural and environmental groups lauded the agreement, saying it was the best outcome for all parties, including for the climate.
The National Farmers Federation said the government had wasted almost $500 million on the project, and local mining should be permanently banned.
"The fertile black soil of the Liverpool Plains is some of the best farm land in Australia. It is a region of national significance," president Fiona Simson said.
"It is also home to the largest single underground water resource in the Murray Darling Basin. The proposed mine was never in the national interest and should never have been considered in the first place."
The Nature Conservation Council said it welcomed the cancellation of the exploration licence, arguing it was a victory for people power.
"This will mark the end of a 12-year campaign by locals and conservation groups to protect rare woodlands and threatened species, including a colony of 250 koalas and endangered swift parrots and regent honeyeaters," NCC chief executive Chris Gambian said in a statement.
"It is regrettable that local communities had to endure more than a decade of stress and anxiety for a project that should never have been approved."
While the Shenhua Watermark proposal has been canned, Mr Barilaro said the Wollar area in central west NSW would be opened for mining exploration.
Open cut coal mining at Dartbrook in the NSW Upper Hunter, however, will not be permitted. Underground mining will be able to proceed.
The changes come as NSW establishes a program to set aside $25 million in mining royalties each year for spending in mining communities.
Mr Barilaro said the funding would help those communities develop other viable industries over the long term and retain jobs.
Australian Associated Press