A federal judge from Montana has blocked construction of the controversial Keystone XL oil pipeline. US District Judge Brian Morris said that the Trump administration’s 2017 decision to move forward with the project disregarded “inconvenient factual determinations” about the 1,184-mile-long pipeline’s impact on the climate made under Obama. Construction of the $8 billion project, which was due to begin as early as next year, is now halted until the State Department completes a supplemental environmental review.

In late 2015, President Barack Obama rejected the pipeline, saying it would undercut America’s leadership in the fight against climate change. But President Trump reversed the decision shortly after being sworn in. Under Trump, the State Department argued that climate change issues should now be less of a concern given the “numerous developments” that have occurred since 2015. Morris said such analysis lacked sufficient detail and “falls short of a factually based determination, let alone a reasoned explanation, for the course reversal.”

Disregarding “inconvenient factual determinations”

“An agency cannot simply disregard contrary or inconvenient factual determinations that it made in the past, any more than it can ignore inconvenient facts when it writes on a blank slate,” Morris wrote.

The ruling is a rare win for environmental groups, who have seen their cause continually thwarted by the Trump administration. As well as slashing funds for the Environmental Protection Agency, the administration also installed a leader who once questioned whether global warming was a bad thing in the first place. The administration has also rolled back much of Obama’s environmental protections surrounding vehicle emissions and clean energy, and has withdrawn from the Paris climate agreement.