A federal judge on Wednesday threw out the permits for a controversial oil project planned for Alaska’s North Slope, faulting the way the federal government had assessed its environmental impact, including how it might harm polar bears. ConocoPhillips’s Willow project had been backed by both the Trump and Biden administrations, despite a host of concerns environmentalists and others raised about how the large operation might affect wildlife and the Indigenous communities.

U.S. District Judge Sharon Gleason — an Obama appointee — wrote in her ruling that the Bureau of Land Management and the U.S. Fish and Wildlife Service incorrectly approved the project because they failed to adequately analyze its climate impact and other possible development plans, and didn’t specify how polar bears would be protected.

The decision is a major blow to the project, which has been touted by Alaska’s congressional delegation and industry as an important source of jobs for the state. The project, located west of Prudhoe Bay in the Alaskan Arctic, could potentially produce up to 160,000 barrels of oil per day.

After the Trump administration approved the drilling, Alaska Natives and environmental activists sued to stop it, resulting in a preliminary injunction by the U.S. Court of Appeals for the 9th Circuit in February.

Gleason said federal agencies’ environmental impact statements failed the meet the requirements laid out in two landmark laws, the National Environmental Policy Act and the Environmental Protection Act.For example, the Fish and Wildlife Service had concluded last year that the project probably would not harm polar bears, a threatened species, or their critical habitat. But Gleason found that the agency didn’t adequately specify how the operation could hurt the bears or what measures would be in place to protect them

The judge also found that the Bureau of Land Management relied on a model for estimating the project’s overall greenhouse gas emissions that had already been rejected in another case.

“As to the errors found by the Court, they are serious,” Gleason wrote. “BLM also failed to adequately analyze a reasonable range of alternatives for the Willow Project — a process that is ‘the heart of the environmental impact statement.’ ”

Opponents of the project hailed Gleason’s decision.

“We and our clients are just celebrating that there’s not going to be any Willow construction this winter,” said Bridget Psarianos, a staff attorney with Trustees for Alaska, which represented six clients in the case, including the group Sovereign Iñupiat for a Living Arctic. “The project can’t move forward without a significant amount of redoing.”

Psarianos added that she hopes the Biden administration “takes this opportunity to actually engage in a process that complies with the law and honors the campaign promises of making science-based decisions and protecting biodiversity and taking the concerns of indigenous populations seriously.”