An Australian court on Friday ruled that a huge coal mine would be permitted to destroy habitat that's home to hundreds of the country’s increasingly imperiled koalas.

The Chinese-owned Shenhua Group wants to build an open-pit mine on 13.5 square miles of the Liverpool Plains, a fertile agricultural region 250 miles northwest of Sydney. The region is known as the koala capital of Australia for what was a large and healthy population of the animals.

The iconic marsupial is considered one of the species most at risk from climate change owing to its inability to tolerate rising temperatures. After years of heat waves, a colony of 10,000 koalas in a large forest west of the Liverpool Plains all but disappeared by 2011. And a 2009 heat wave in the Liverpool Plains killed off an estimated 25 percent of the region’s koalas, triggering an outbreak of chlamydia, a sexually transmitted disease that leaves the animals blind and infertile. Before the heat wave, the Liverpool Plains koalas were virtually chlamydia free, according to scientists. When researchers captured 24 koalas in September of last year, 67 percent of the animals tested positive for chlamydia.

Related The Koala in the Coal Mine

Farmers fear the coal mine could contaminate an extensive aquifer that has transformed the Liverpool Plains into Australia’s food basket. “The hill where the mine is going to be is a source of water for the aquifer, as is all the hills in the district,” farmer Andrew Pursehouse told me last September as we stood on his 11,000-acre farm, which borders the mine site. “What’s the next generation going to say if we let this mine go through and destroy the underground water?”

An estimated 260 koalas live on 2,000 acres of woodlands that would be bulldozed for the mine. Shenhua said it would relocate the animals if they did not naturally disperse, though the company acknowledged that such a translocation carried a “significant risk” to the animals’ survival. Biologists said the mine would cut off a migration corridor for koalas, which have been observed moving south and east as temperatures rise.

“I’m very concerned about what is going to happen to that population of koalas,” David Paull, a wildlife ecologist opposed to the mine, said in September as a large koala dozed in an eucalyptus tree on the Pursehouse farm. “If we lose that population, that will weaken the whole meta-population, and the location of the mine will inhibit the ability of koalas to move in and out of the area. It could be a disaster.”

RELATED: Australia Just Approved a Coal Mine That Will Emit More Greenhouse Gases Than 52 Nations

In 2008, Shenhua paid a $215 million fee to a left-leaning state Labor government for a license to explore 75 square miles of the Liverpool Plains for coal. The project triggered a rebellion among local farmers, who mounted a social media campaign against the mine. The conservative federal government gave final approval for the mine in July 2015. Farmers and environmentalists then filed a legal challenge, arguing that the government failed to adequately consider the impact of the project on the koala, which is listed as a threatened species under federal law.

On Friday, the land and environment court for the state of New South Wales rejected the farmers’ appeal, finding that because the government had designated the mine a “state significant development,” endangered species protections for the koala did not have to be considered.

“Other legislative requirements to consider and decide whether development is likely to significantly affect threatened species, populations or ecological communities, or their habitats, do not apply to state significant development,” wrote Chief Judge Brian Preston in the ruling.

“There was no legal duty…to make definitive findings of fact…about the precise size of the population of koalas that were likely to be impacted by the project or the certainty of success of the koala translocation program, before determining to grant consent to the project,” he added.

Australia is the world’s second-largest exporter of coal, and a series of proposed mines would collectively become the world’s seventh-largest emitter of carbon dioxide if they were all built.

The fate of the Shenhua mine, though, is uncertain. As coal prices drop along with demand from China, Australian mines have become increasingly unprofitable. The Shenhua Group has not moved to renew its exploration license, which expires on Monday, or obtain a $143 million mining lease from the government.

The mine ruling wasn’t the only bad news for koalas this week. On Wednesday, World Wildlife Fund Australia released an analysis that found that 100,000 acres of the animals’ habitat was leveled for development between 2012 and 2014 in the state of Queensland after the government weakened environmental regulations.