A federal judge has brought a halt, at least temporarily, to the construction of the $8 billion Keystone XL Pipeline.

U.S. District Judge Brian Morris said in an order Thursday that there needs to be further analysis of the project’s potential environmental impact.

The judge’s order was handed down as Calgary-based TransCanada was preparing to begin building the pipeline in northern Montana.

Morris said the government must provide “new and relevant information regarding the risk of spills.”

He said the government’s analysis did not fully study the cumulative effects of greenhouse gas emissions, the effects of current oil prices on the pipeline’s viability or include updated modeling of potential oil spills.

The 1,900-kilometer-long pipeline is designed to transport up to 830,000 barrels per day of tar sand oil from Alberta, Canada, to Nebraska, where it would then enter existing pipelines to U.S. Gulf Coast refineries.

In 2015, the Obama administration rejected construction of the pipeline, saying it would detract from America’s global leadership on issues related to climate change.

But the Trump administration overturned the decision, saying that the pipeline is safer than other methods used to transport oil, and calling its completion “long overdue.”

The pipeline construction sparked months of protests by Native Americans and activist groups, who say the project could pollute local water supplies.