Shares of TransCanada Corp.  (TRP)  slipped nearly 2% on Friday, Nov. 9, after a federal judge in Montana blocked the Keystone XL Pipeline.

U.S. District Court Judge Brian Morris in Great Falls ruled late Thursday that the U.S. government didn't complete a full analysis of the environmental impact of the $8 billion pipeline and that it "fell short of a hard look" at the effect the project could have on climate change and Native American land resources.

The judge's ruling follows a lawsuit filed in 2017 by several environmental groups against the U.S. government, soon after President Donald Trump announced a presidential permit for the project.

TransCanada didn't immediately respond to a request for comment. Trump told reporters at the White House that the ruling was "a political decision made by a judge."

"I think it's a disgrace," Trump said.

The 1,184-mile pipeline would transport up to 830,000 barrels of crude a day from Alberta, Canada and Montana to facilities in Nebraska.

Former President Barack Obama rejected the pipeline in 2015, noting environmental concerns related to emissions that cause climate change.

More from Investing

Tesla's Decline Causes Concern for Almost $1 Billion in Bond Payments

Tesla's Decline Causes Concern for Almost $1 Billion in Bond Payments

Tesla Stock Falls 13% After Carmaker Unveils Job Cuts, Q4 Profit Guidance

Tesla Stock Falls 13% After Carmaker Unveils Job Cuts, Q4 Profit Guidance

CVS Reaches Pharmacy Benefits Management System Deal with Walmart

CVS Reaches Pharmacy Benefits Management System Deal with Walmart

Why Jim Cramer Is Holding Off on Buying Nvidia Stock

Why Jim Cramer Is Holding Off on Buying Nvidia Stock

Netflix Stock: Why I'm Keeping My Bird Box Blindfold On

Netflix Stock: Why I'm Keeping My Bird Box Blindfold On