(CNN/RNN) – A federal judge blocked construction of the Keystone XL pipeline Thursday.
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, which was drafted in 2014.
"The Court enjoins Federal Defendants and TransCanada from engaging in any activity in furtherance of the construction or operation of Keystone and associated facilities," the court document says, "until the Department has completed a supplement to the 2014 SEIS (Supplemental Environmental Impact Statement) that complies with the requirements of NEPA (National Environmental Policy Act) and the APA (Administrative Procedure Act)."
The court also ruled that the permit violated the Endangered Species Act.
The Obama administration denied a permit based on the contents of the environmental impact statement 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 U.S. to refineries on the Gulf Coast.
Tar sands mining is considered one of the dirtiest sources of energy in the world.
The Keystone XL pipeline is also facing financial problems – the TransCanada energy company has not committed to build, even if it receives the necessary permits.