A judge in Montana has halted the construction of Keystone XL, one of the most controversial pipelines in North America. On Thursday, U.S. District Judge Brian Morris ruled in favor of the Indigenous Environmental Network and Northern Plains Resource Council, who had argued that Trump violated several laws by approving the pipeline that would carry crude oil from Alberta’s oil sands to Nebraska. The Obama administration had stopped the project due to concerns about its greenhouse gas emissions, but two days after he took office, President Donald Trump approved it with a presidential permit. The court case sought an injunction against that permit. In granting it, the judge ruled the state department’s analysis under Trump “fell short of a ‘hard look’” on the following points: the effects of current oil prices on the pipeline’s viability, the cumulative effects of greenhouse gas emissions, a survey of potential cultural resources, and an updated modeling of potential oil spills and recommended mitigation measures. “The major spills that occurred between 2014 and 2017 qualify as significant,” the judge wrote. The department would have looked at those spills in its 2014 environmental review if that information had been available, he wrote. But, similar to a recent Canadian court decision that sent the Trans Mountain pipeline expansion back for additional consultation and review, the U.S. court decision is not a death blow to Keystone XL. It simply means the Trump administration must go back and complete a proper assessment before approving the project. Dallas Goldtooth, executive director of the Indigenous Environmental Network, tweeted , “This is a win for Lakota, the Oceti Sakowin and other Tribal Nations, for the water, and for the sacredness of Mother Earth. This decision vindicates what we have been saying all along: Trump’s approval of this pipeline was illegal, violated environmental laws and was based upon fake facts. Our legal fight has been for the benefit of all life along the proposed route of this Canadian tar sands pipeline.” “This pipeline is the enemy of the people and life as we know it,” he added. “It must be stopped.” Neither the State Department nor TransCanada, the company that owns the pipeline, have commented on the decision. The company previously called the project a “safe, reliable and environmentally responsible way to deliver crude oil to markets in the U.S.” The $10 billion TransCanada pipeline would run from Hardisty, Alberta to Steele City, Nebraska, bringing oil from Alberta’s oil sands south through the U.S. Cover image of opponents of the Keystone XL pipeline, demonstrating on the Dodge Street pedestrian bridge during rush hour in Omaha, Neb., on Nov. 1, 2017. Photo by Nati Harnik/The Canadian Press This article originally appeared on VICE News CA.