Lincoln — Nebraska regulators approved a route for TransCanada Corporation’s Keystone XL pipeline through the state on Monday, lifting the last big regulatory obstacle for the long-delayed project that US President Donald Trump wants built.

The 3-2 vote by the Nebraska Public Service Commission helps clear the way for the pipeline linking Canada’s Alberta oil sands to refineries in the US, but is likely to be tied up for years in court challenges by opponents who say the project is an environmental risk.

"We are going to fight like hell to make sure this pipeline never gets built," said Jane Kleeb, the head of anti-pipeline Bold Nebraska, a political advocacy group.

The commission’s approval was not for TransCanada’s preferred route, but for a more costly alternative that would add 8km of pipeline, along with an additional pumping station and transmission lines.

It was unclear whether the alternative route lacks any state or federal permits that the preferred route had already obtained, a situation that could drag out the regulatory process.

TransCanada CEO Russ Girling said in a statement that the company would review the commission’s decision and assess its impact to the cost and schedule of the project.

The company’s stock was up 1.4% at C$63.44 in Toronto on Monday afternoon.

The proposed line, running about 1,899km from Hardisty, Alberta, to Steele City, Nebraska, has been controversial since it was first advocated nearly a decade ago, with environmentalists making it into a symbol of their broader fight against fossil fuels and global warming.

Business groups and Trump said it could lower fuel prices, boost national security and create employment.

The administration of former US president Barack Obama, a Democrat, considered the project for years before rejecting it in 2015, saying "it would not make a meaningful contribution to our economy".

But Trump swiftly reversed that decision after coming into office this year, handing TransCanada a federal permit for the pipeline in March.

Trump has said Keystone XL would create 28,000 jobs nationwide. But a 2014 State Department study predicted just 3,900 construction jobs and 35 permanent jobs.

Trump’s decision placed the pipeline’s fate into the hands of the obscure regulatory body in Nebraska, the only state that had to approve the pipeline’s route. Permits along Keystone XL’s path have already been granted in Canada, Montana and South Dakota.

Uncertain market

Opposition to the line in Nebraska has been driven mainly by a group of about 90 landowners whose farms lie along the proposed route. They have said they are worried spills could pollute water critical for grazing cattle, and that tax revenue will be short-lived and jobs will be temporary.

Just days ago, TransCanada’s existing Keystone system spilled 5,000 barrels in South Dakota and pipeline opponents said the spill highlighted the risks posed by the proposed XL expansion.

Rancher Randy Thompson stood in the hearing room after the commission’s decision on Monday and shook his head. "Common sense has gone out the window on this project," he said.

The commission’s approval of TransCanada’s "alternative" route, instead of its first choice, surprised some Nebraskans.

Ron Schmidt, one of three commissioners in Madison County — which lies along the alternative route — said that Monday’s decision would likely necessitate a new process to obtain local input.

"I don’t think anyone has officially been told where this new route will be," he said.

A Nebraska Department of Environmental Quality spokesman said the agency was looking into whether TransCanada would need to negotiate right-of-way agreements with those landowners or apply for any new permits. Federal regulators did not immediately respond to questions about whether additional studies would be required.

If built, the pipeline could be a boon for Western Canadian oil companies, which have struggled for decades to bring their vast reserves to market. But the project would fall short of Canada’s ambition to build a pipeline to a Canadian deepwater port, allowing it to tap into the global market.

"This is a very low on the totem pole achievement," said Rafi Tahmazian, a portfolio manager at Canoe Financial in Calgary. "What we as a Canadian industry and a Canadian economy need is diversification to other parts of the world."

There are also questions about demand for the pipeline after a surge in US drilling activity.

"Considering the growth of oil output in the US … the economics of importing the heavy crude from Canada are not fully justified," said Chirag Rathi, director at business consultancy Frost and Sullivan in Texas.

TransCanada has said it has received adequate support to make the pipeline viable. But it has yet to announce results of its open season to gauge interest among shippers, which closed at the end of October.