A federal judge threw out the permits Wednesday 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 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, west of Prudhoe Bay in the Alaskan Arctic, could 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 to 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.”

A spokeswoman for ConocoPhillips, Rebecca Boys, said the company “will review the decision and evaluate the options available regarding this project.”

An Interior Department spokesperson said in a statement: “In a lengthy decision, the district court identified a number of issues in the environmental reviews and approvals issued in 2020. The Interior Department is analyzing the decision.”

ConocoPhillips’s drilling plan entailed building multiple drilling sites, a processing facility, a gravel mine, and hundreds of miles of roads and pipelines in the National Petroleum Reserve-Alaska, the largest single piece of public land in the country. The site is located near Nuiqsut, an Indigenous community where residents traditionally hunt for migrating caribou.

After the Trump administration’s permits were challenged in court, many critics of the project expected the incoming Biden administration to abandon the Willow project. Interior Secretary Deb Haaland had opposed the project while serving as a member of Congress, and the White House targeted it for a review immediately after Biden took office.

Instead, the Interior Department defended it in court earlier this year.

Jeremy Lieb of Earthjustice, the lead attorney for the plaintiff group that included the Center for Biological Diversity on a separate but related case, called the judge’s decision a “big win for our clients and for the climate.”

“This certainly gives the Biden administration the opportunity to reconsider whether to approve the project in light of its commitment to address climate change. And it should do that,” Lieb said. “We’re hopeful that the project won’t come back.”