The privately financed pipeline is projected to stretch 1,179-miles (1,897km) from the oil sands of Canada's Alberta province, through Montana and South Dakota, to rejoin an existing pipeline to Texas.
The Keystone XL pipeline permit decision was largely in the hands of the State Department, by virtue of its authority to issue "presidential permits" for cross-border infrastructure projects.
U.S. District Judge Brian Morris said the Trump administration's projections for the pipeline's contribution to greenhouse gas emissions, potential for oil spills and impact on the local Native American community fell short, the Montana-based Great Falls Tribune reports.
In a 54-page order issued late Thursday, Judge Morris alleges the US Department of State committed multiple violations when it approved the construction of the $8 billion, 1,900-kilometer pipeline in 2017.
Morris was appointed in 2013 by then-President Barack Obama, who had refused to grant a cross-border permit for the global project.
But it has been the subject of protests for more than a decade, both from environmentalists and Native American groups, who say it will cut through their sovereign lands.
The judge added that the Trump administration had not adequately accounted for potential declines in oil prices, which have been depressed since the crash of 2014, and which would have a major effect on the long-term viability of such a project. "Today, the courts showed the Trump administration and their corporate polluter friends that they can not bully rural landowners, farmers, environmentalists and Native communities". The State Department initially denied the pipeline a permit in 2015, under the Obama administration.
However, President Donald Trump reversed the decision shortly after taking office, saying it would bring thousands of jobs.
Doug Hayes, a lawyer for the Sierra Club environmental group, said the ruling made clear it was it was time to give up on the "Keystone XL pipe dream". It "ignored its duty to take a "hard look" at these two connected actions". "The Department appears to have jumped the gun".
"An agency can not simply disregard contrary or inconvenient factual determinations that it made in the past", Morris wrote Thursday. It did not provide one.
Stephan Volker, an attorney for the complainants', called Morris' ruling "a landmark".
"It's emblematic of what we're seeing with the Trump administration, which is a very fast and sloppy reversal of prior decisions.in a way that doesn't adhere to the rule of law", Prange told The Post. "It's not over for us, we're just going to keep on going ahead".