U.S. District Judge Brian Morris issued an order Thursday blocking construction of the $8 billion Keystone XL Pipeline until further environmental analysis is conducted.

The decision comes as TransCanada is preparing to build the oil pipeline beginning in northern Montana, with pipe being shipped to the state by train and trucked to locations along the line.

TransCanada released a statement Friday saying it is reviewing the judge's decision.

"We remain committed to building this important energy infrastructure project," said Terry Cunha, communications manager for TransCanada.

More:Keystone order: Blow to Trump or overreach by judge?

President Donald J. Trump criticized the order.

"Well, it was a political decision made by a judge," he said Friday as he headed to Europe to observe the 100th anniversary of the end of World War I. "I think it’s a disgrace. It’s 48,000 jobs. I approved it; it’s ready to start."

Environmental groups that sued TransCanada and the U.S. Department of State in federal court in Great Falls called the decision to overturn the Trump administration-issued permit a landmark ruling.

More:Army of attorneys spar over Keystone pipeline in Great Falls court

In his decision, Morris said the government's analysis fell short on:

» The effects of the current oil prices on the viability of the pipeline.

» The cumulative effects of greenhouse gas emissions.

» A survey of potential Native American resources.

» And updated modeling of potential oil spills and recommended mitigation measures.

"The Department must supplement new and relevant information regarding the risk of spills," Morris wrote.

As for climate change, Morris noted that the department denied the permit in 2015 and relied heavily on the United State's role in climate leadership. That was under the Obama Administration.

Then, under the Trump administration, the department approved the permit, dismissing concerns about climate change.

The Trump Administration decision approving the project noted that “there have been numerous developments related to global action to address climate change, including announcements by many countries of their plans to do so” since the 2015 decision.

Morris said that statement fell short of a factually based determination, let alone a reasoned explanation, for the course reversal.

“An agency cannot simply disregard contrary or inconvenient factual determinations that it made in the past, any more than it can ignore inconvenient facts when it writes on a blank slate," Morris wrote.

The reversal required a "reasoned explanation" but instead the State Department discarded prior factual findings related to climate change, the judge said.

Keystone XL Pipeline would transport up to 830,000 barrels per day of crude oil from Alberta, Canada and the Bakken Shale Formation in Montana to existing pipeline facilities near Steele City, Neb., from which the oil would be delivered to Cushing, Okla., and the Gulf Coast.

The U.S. portion of the line would run 875 miles through Montana, South Dakota and Nebraska. The rest of the 1,200-mile line is in Canada.

About 250 miles of the pipeline would be buried across six counties in Montana beginning on the border with Canada in Phillips County. TransCanada already as begun delivering pipe to Montana in expectation of construction beginning in 2019.

The Indigenous Environmental Network, North Coast Rivers Alliance, Northern Plains Resource Council and other groups sued TransCanada and the U.S. State Department in March to block the decision to issue a presidential permit allowing construction.

"I would call it a landmark ruling because it overturns a presidential decision purporting to find that a transboundary project is in the public interest," Stephan Volker, a Berkeley-based attorney for the plaintiffs, told the Tribune. "And Judge Morris correctly ruled it was not in the public interest because Secretary Kerry had found in a detailed ruling several years ago it was not in the public interest."

John Kerry was secretary of state when the Obama administration denied the presidential permit for the pipeline.

A presidential permit is required when a project crosses an international boundary. The secretary of state makes a recommendation, then the president decides.

"We have never had a ruling against a president overturning a substantive finding a project is in the public interest," Volker said. "That finding is required for transboundary projects. So it's unique to this kind of national project that affects multiple countries."

Dena Hoff, a Glendive farmer and member-leader of the Northern Plains Resource Council, called the ruling a victory for rule of law and common sense stewardship of land and water.

"All Americans should be proud that our system of checks and balances can still function even in the face of enormous strains," Hoff said.

The Fort Peck tribes of Montana have opposed the current location of the pipeline crossing on the Missouri River in Valley County, Montana because they say if there was an oil spill it could taint their downstream water system.

More:Montana tribes seek Keystone route change

The pipeline would cross the Milk River 1.6 miles west of Nashua, and the Missouri River just west of the mouth of the Milk. That location is 57 miles upstream from the intake of the Assiniboine and Sioux Rural Water Supply System.

TransCanada says the pipeline will be safe. At the Missouri River, the pipeline depth would be 54 feet below the lowest surveyed river elevation, and heavier-walled pipe with anti-corrosion coating would be used.

"Pipelines are the safest and most cost-effective form of overland crude oil transportation," according the environmental impact statement that was completed on the project.

The Obama Administration, citing climate change, had denied the permit, saying it wasn't in the national interest.

In approving the pipeline, the Trump Administration said the project would support U.S. priorities relating to energy security, economic development and infrastructure.

The environmental groups argued it would push the earth beyond its carrying capacity for carbon dioxide, and asked how that could be in the public's interest.

In the same case, Morris directed the government in August to supplement the 2014 final supplemental environmental impact statement to consider another alternative route through Nebraska.

More:Great Falls judge orders new federal review of Keystone XL pipeline

But the court had yet to decide on vacating the presidential permit granting permission to cross the international border between Canada and the United States at Montana.

Morris’s 54-page order overturns the Trump Administration’s approval of the Keystone XL Pipeline and issues an injunction preventing construction of the project until additional analysis occurs.

Staff Writer Phil Drake contributed to this story.