A federal judge in Montana halted construction of the Keystone XL oil pipeline on Nov. 8 on the grounds that the U.S. government did not complete a full analysis of the environmental impact of the TransCanada Corp. (NYSE: TRP) project.

The ruling could possibly delay the construction of the $8 billion, 1,180-mile (1,900-km) pipeline.

U.S. District Court Judge Brian Morris’ ruling late on Nov. 8 came in a lawsuit that several environmental groups filed against the U.S. government in 2017, soon after President Donald Trump announced a presidential permit for the project.

Morris wrote in his ruling that a U.S. State Department environmental analysis “fell short of a ‘hard look’” at the cumulative effects of greenhouse gas emissions and the impact on Native American land resources.

He also ruled the analysis failed to fully review the effects of the current oil price on the pipeline’s viability and did not fully model potential oil spills and offer mitigations measures.

In the ruling, Morris ordered the government to issue a more thorough environmental analysis before the project can move forward.

Trump supported building the pipeline, which was rejected by former President Barack Obama in 2015 on environmental concerns relating to emissions that cause climate change.

Trump said the project would lower consumer fuel prices, create jobs and reduce U.S. dependence on foreign oil.