WASHINGTON (Reuters) - A federal judge in Montana has ordered the U.S. State Department to do a full environmental review of a revised route for the Keystone XL oil pipeline, possibly delaying its construction and dealing another setback to TransCanada Corp TRP.TO.

Slideshow ( 3 images )

For more than a decade, environmentalists, tribal groups, and ranchers have fought the $8-billion, 1,180-mile (1,900-km) pipeline that will carry heavy crude to Steele City, Nebraska, from Canada’s oilsands in Alberta.

U.S. District Court Judge Brian Morris ruled late on Wednesday for the Indigenous Environmental Network and other plaintiffs, ordering the review of a revised pipeline route through Nebraska to supplement one the State Department did on the original path in 2014.

The State Department was obligated to “analyze new information relevant to the environmental impacts of its decision” to issue a permit for the pipeline last year, Morris said in his ruling.

Supporting the project are Canadian oil producers, who face price discounts over transport bottlenecks, and U.S. refineries and pipeline builders.

TransCanada is reviewing the decision, company spokesman Matthew John said. It hopes to start preliminary work in Montana in the coming months and to begin construction in the second quarter of 2019.

The company said this month it expects to make a final investment decision late this year or in early 2019.

The ruling is negative for TransCanada, since it adds uncertainty to timing, said RBC analyst Robert Kwan, and it was important that the pipeline be constructed during the current U.S. presidential cycle.

President Donald Trump is keen to see the building of the pipeline, which was axed by former President Barack Obama in 2015 on environmental concerns relating to emissions that cause climate change.

TransCanada shares rose 0.2 percent in trading in Toronto.

The White House did not respond to a request for comment. The State Department is reviewing the court’s order, a spokesman said.

The ruling was “a rejection of the Trump administration’s attempt to ... force Keystone XL on the American people,” said Jackie Prange, a lawyer for the Natural Resources Defense Council, an environmental group.

Trump pushed to approve the pipeline soon after he took office, and a State Department official signed a so-called presidential permit in 2017 allowing it to move forward.

However, Morris declined the plaintiff’s request to void that permit, which was based on the 2014 review.

Last year, Nebraska regulators approved an alternative route for the pipeline, which will cost TransCanada millions of dollars more than the original path.

In a draft environmental assessment last month, the State Department said Keystone XL would not harm water supplies or wildlife. That review is less wide-ranging than the full environmental impact statement Morris ordered.