A New South Wales Land and Environment Court judged favoured grapes over coal on Monday when he upheld a government ruling that stopped the expansion of mining giant Rio Tinto's (ASX: RIO) coal mine in the country's famous wine-growing region of Hunter Valley.

Justice Brian Preston upheld the appeal of resident of Bulga who complained about the noise, dust emissions and the negative effect of the mine expansion on their village, located northeast of the Warkworth mine.

In response to the favourable court decision, Steve Phillips, Hunter regional coordinator of the environmental group Lock the Gate Alliance, said in a statement, "This is a huge win for the community of Bulga, which would have been all wiped off the map by this coal mine."

Although Australia is the largest global source of the commodity, green groups are increasing their efforts to discourage or block the expansion of coal mining in parts of the country. In February, the Coast and Country Association of Queensland stopped a plan by GVK Group and Gina Rinehart, the country's richest person, to build a $10 billion coal mine, port and rail project.

In 2012, green groups also stopped Xstrata (ASX: XTA) from building the Wandoan coal mine in Queensland.

Rio lamented the court decision and warned 1,300 workers are at risk of losing their jobs with the court's ruling.

"It is also a setback for hundreds of suppliers across the Hunter Valley and NSW who do business with the Mount Thorley Warkworth mine and will directly impact the region's economy," Darren Yeates, acting managing director of Coal & Allied, a Rio subsidiary, said in a statement.

Rio went through a long government approval process that took three and a half years and had secured approvals from the state and federal environment agencies. But the Bulga-Milbrodale Progress Association filed a legal challenge to the coal mine's expansion.