LINCOLN, Neb./CALGARY, Alberta (Reuters) - Nebraska regulators approved a route for TransCanada Corp's TRP.TO Keystone XL pipeline through the state on Monday, removing a big regulatory obstacle for the long-delayed project backed by President Donald Trump, but leaving its future shrouded in legal and market uncertainty.

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 United States. But opponents have promised to tie the project up in court for years and TransCanada is still studying its commercial viability after a surge in U.S. drilling that has cut crude oil prices roughly in half since the pipeline was first proposed.

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

The commission’s approval was not for TransCanada’s most preferred route, but for a more costly alternative that would add 5 miles (8 km) of pipeline, along with an additional pumping station and related transmission lines. States and federal officials said it was unclear if the route required any additional permits that the preferred route already had.

TransCanada Chief Executive Officer Russ Girling said in a press release that the company will review the commission’s decision to assess its impact to the project’s cost and schedule. The company’s stock was up 1.6 percent at C$63.55 in Toronto on Monday afternoon.

The White House said the president was “pleased” with the decision. “We look forward to seeing another promise fulfilled,” said Hogan Gidley, a deputy press secretary.

Alberta Premier Rachel Notley said the pipeline “will mean greater energy security for all North Americans.”

The proposed line, which would run about 1,180 miles (1,899 km) from Hardisty, Alberta, to Steele City, Nebraska, has long been a lightning rod of controversy. Environmentalists have made it into a symbol of their broader fight against fossil fuels and global warming. Business groups and Trump, meanwhile, say it could lower fuel prices and create employment.

Trump handed TransCanada a federal permit for the pipeline in March as part of a broader agenda to boost the energy sector, reversing a decision by former U.S. President Barack Obama in 2015 to block the project on the grounds that it would not bring significant enough economic benefits to outweigh its environmental impact.

The White House on Monday said Keystone XL would create 42,000 jobs nationwide. But a 2014 State Department study predicted just 3,900 construction jobs and 35 permanent jobs.

Nebraska had been the only state yet to approve the pipeline’s route. Permits have already been granted in Canada, Montana and South Dakota.

UNCERTAINTY

If built, the pipeline could be a boon for Canada and its Western oil producers, which have struggled for decades to bring their vast land-locked reserves to market. But it would fall short of Canada’s ambition to build a pipeline to a deepwater port to tap into the global market.

FILE PHOTO -- A TransCanada Keystone Pipeline pump station operates outside Steele City, Nebraska March 10, 2014. REUTERS/Lane Hickenbottom/File Photo

“This is a very low on the totem pole achievement,” said Rafi Tahmazian, a portfolio manager at Canoe Financial.

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.

“While today’s Keystone XL pipeline approval is an important milestone, it does not provide certainty that the project will ultimately be built and begin operating,” said Gavin MacFarlane, a vice president at Moody’s Investors Service.

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

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.

“Common sense has gone out the window on this project,” said rancher Randy Thompson after the commission’s decision.

The commission’s approval of TransCanada’s “alternative” route surprised some Nebraskans. Ron Schmidt, one of three commissioners in Madison County, which lies along the alternative route, said it would likely trigger a new process to obtain local input.

“I don’t think anyone has officially been told where this new route will be,” he told Reuters.

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.

A U.S. State Department official said that it was also “in the process of gaining more precise information in order to determine if there will be any permitting impacts” because of the proposed alternative route.

Tim McMillan, chief executive of the Canadian Association of Pipeline Producers, said he believed the route would likely only require added regulatory scrutiny in Nebraska.

“The expectation is TransCanada would work with landowners ... and come to agreements to put infrastructure in the ground,” he said.