Keystone XL pipeline sections in Little Rock, Ark. The pipes were manufactured by Welspun in Arkansas. The steel, however, was sourced from various countries. Justin Solomon | CNBC

A federal judge in Montana dealt the Keystone XL pipeline another setback on Friday, effectively blocking TransCanada's latest effort to begin work on the project. U.S. District Court Judge Brian Morris ruled that TransCanada cannot do most work to prepare for construction, including setting up camps for workers who would build the pipeline if it is allowed to move forward. The judge said TransCanada can move pipe to storage yards along the pipeline route. The decision threatens to prevent TransCanada from beginning construction on the pipeline this year, and may push its earliest start date into 2020. The ruling is the latest blow in a series of defeats for the $8 billion project. The line would transport heavy crude from Alberta, Canada to Steel City, Nebraska, where it would link up with existing lines to transport oil supplies to Gulf Coast refineries.

Keystone XL has become a major flash point in the growing war between environmentalists and the oil industry over expanding pipeline infrastructure. The line has now been tangled up in political battles for about a decade. "It's been two years since the Trump administration tried to revive this pipeline from the dead, but Keystone XL is still far from being built," Jackie Prange, senior attorney at Natural Resource Defense Council said in a statement. "Today's decision is one more victory for the rule of law over this reckless and risky project." TransCanada could not immediately be reached for comment. The Obama administration blocked the cross-border pipeline in 2015, largely over environmental and climate concerns. The line would carry oil sands, a type of crude that former Secretary of State John Kerry called "a particularly dirty source of fuel." In one of his first acts as president, Donald Trump signed an executive order to advance Keystone XL and another controversial pipeline, Dakota Access, which started service over a year ago. In November, Morris ruled that the Trump administration failed to conduct the necessary environmental review when it approved Keystone XL in 2017. The judge blocked construction of the line, and a month later prohibited TransCanada from any activity that advances the project until new environmental reviews have been completed.