A federal judge blocked construction of the Keystone X-L pipeline just before midnight last night.
The ruling says the Trump administration violated environmental laws when it approved a permit for the pipeline.
The court ordered the Department of State to update the project’s environmental impact statement.
That statement was drafted in 2014.
The Obama administration denied a permit based on its contents before the Trump administration reversed that decision.
Officials must provide an explanation as to why that decision was reversed if it hopes to proceed.
The pipeline would transport oil from Canada’s tar sands across the country to refineries on the Gulf Coast.
Tar sand mining is considered one of the dirtiest sources of energy in the world.
The Keystone X-L Pipeline is also facing financial problems. TransCanada has not committed to build it if it receives the necessary permits.