The ruling on Thursday by Judge Brian Morris of the US District Court for the District of Montana dealt a stinging setback to Trump and the oil industry and served up a big win for conservationists and indigenous groups.
The decision is a blow to Trump, who signed an executive order after just two days in the White House to grant a permit for the construction of Keystone XL and Dakota Access, another bitterly-opposed project that sparked fierce protests form native American groups.
But the Trump administration dismissed environmental objections as roadblocks and claimed that there were "numerous developments related to global action to address climate change" in the years since Obama-era rejection of the project.
What is the Keystone XL Pipeline?
"The Trump administration tried to force this dirty pipeline project on the American people, but they can't ignore the threats it would pose to our clean water, our climate, and our communities", said the Sierra Club, one of the environmental groups involved in the lawsuit.
The permit approval followed years of intense debate over the pipeline amid steadfast opposition from environmental groups. "TransCanada does not have an approved pipeline at this point".
Red Dead Redemption 2: How to Fix the Missing Camp Bug
I got to know each member of my gang in depth thanks to the game's new, simple, yet intuitive dialogue systems. There's no way in heck I'm restarting though, given how much of a chore some of the game's minutiae is.
Facebook Messenger's new Unsend messages option gets confirmed
Users may now delete messages on the Messenger app but it only reflects on the sender's end and remains on the recipient's thread. Facebook Messenger will soon introduce a feature that lets you delete a message up to 10 minutes after it's already been sent.
SA journalist, colleague freed from detention in Tanzania
Their arrest attracted worldwide condemnation from the media fraternity, civil society and US State Department officials. Mtanda said Quintal and Mumo were free to stay on in Tanzania as long as they heeded the terms of their 90-day visa.
The US$8-billion project would help carry 830,000 barrels of crude a day from Hardisty, about 200 kilometres east of Red Deer, to Steele City, Neb., where it could then move on to refineries in the central USA and Gulf Coast.
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.
NPR reached out to TransCanada early Friday for comment on the ruling but did not hear back by the time of publishing.
In Thursday's ruling, Morris wrote that the State Department's analysis of potential environmental effects fell short of a "hard look" on the effects of current oil prices on the viability of Keystone, cumulative effects of greenhouse gas emissions, cultural resources and potential oil spills.
Morris' ruling came as Canadian energy company TransCanada began delivering pipe to Montana in anticipation of construction in 2019. "The courts showed the Trump administration and their corporate polluter friends that they can not bully rural landowners, farmers, environmentalists, and Native communities".
"And frankly, approving this project would have undercut that global leadership", he said, adding that the "biggest risk" the US faced was "not acting".
Morris' order does not permanently extinguish hopes Keystone XL will go ahead, but it will require the administration to come up with a better explanation as to why it should proceed.