A federal judge ruled that the Interior Department violated federal law by failing to take into account the climate impact of its oil and gas leasing in the West.

The decision late Tuesday by U.S. District Judge Rudolph Contreras in the District of Columbia marks the first time the Trump administration has been held to account for the climate impact of its energy agenda, and it could have sweeping implications for the president’s plan to boost fossil fuel production across the country. Contreras concluded that Interior’s Bureau of Land Management “did not sufficiently consider climate change” when making decisions to auction off federal land in Wyoming to oil and gas drilling. The judge temporarily blocked drilling on roughly 300,000 acres of land in the state.

The initial ruling in the case brought by two advocacy groups, WildEarth Guardians and Physicians for Social Responsibility, has implications for oil and gas drilling on federal land throughout the West. In the decision, Contreras — a Barack Obama appointee — faulted the agency’s environmental assessments as inadequate because it did not detail how individual drilling projects contributed to the nation’s overall carbon output. Since greenhouse gas emissions are driving climate change, the judge wrote, these analyses did not provide policymakers and the public with a sufficient understanding of drilling’s impact, as required under the National Environmental Policy Act.

“Given the national, cumulative nature of climate change, considering each individual drilling project in a vacuum deprives the agency and the public of the context necessary to evaluate oil and gas drilling on federal land before irretrievably committing to that drilling,” he wrote.

Contreras did not void the leases outright, but instead ordered BLM to redo its analysis of hundreds of projects in Wyoming.

Jeremy Nichols, who directs WildEarth Guardians’ climate and energy program, said in a phone interview that the decision would force the administration to reveal how its policies are helping to fuel climate change. He said his group would now take steps to try to block federal oil and gas lease auctions scheduled for next week, which encompass 560,000 acres of western land.

“It calls into question the legality of the Trump administration’s entire oil and gas program, Nichols said. “This forces them to pull their head out of the sand and look at the bigger picture.”

Still, even if Contreras’ decision stands it may not block the administration’s energy agenda altogether. While BLM would be required to disclose the overall climate impact of its leasing decisions, it could potentially still go ahead and open those lands up for development.

While the Interior Department began to take into account the climate impacts of federal oil, gas and coal leasing toward the end of President Obama’s second term, Trump administration officials jettisoned those plans right after President Trump took office. Trump and several of his top deputies have dismissed recent federal findings that the United States and other countries must curb their carbon output in the next decade or face potentially disastrous consequences from climate change.

Interior officials did not immediately comment Wednesday.