LINCOLN, Nebraska/WASHINGTON (Reuters) – Nebraska regulators voted on Monday to approve a route for TransCanada Corp’s (TRP.TO) Keystone XL pipeline through the state, lifting the last big regulatory obstacle for the long-delayed project that U.S. President Donald Trump wants built.

The 3-2 decision 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 is likely to be challenged in court by opponents who say the project is an environmental risk.

The commission’s approval was not for TransCanada’s preferred route, but for a slightly longer alternative that could prove more difficult and costly to build. It was unclear whether the company will decide to pursue the project as it considers the commercial viability.

TransCanada did not immediately respond to a request for comment on the commission’s vote.

TransCanada stock rose as much as 2 percent to the session’s high of C$63.80 after the decision, while the broader Canada stock index was up 0.2 percent.

Trump, a Republican, has made Keystone XL’s success a plank in his effort to boost the U.S. energy industry. Environmentalists, meanwhile, have made the project a symbol of their broader fight against fossil fuels and global warming.

The proposed line has been a lightning rod of controversy since it was first advocated nearly a decade ago. The administration of former President Barack Obama, a Democrat, considered the project for years before rejecting it in 2015 on environmental grounds, under pressure from activist groups.

Trump swiftly reversed that decision after coming into office this year, handing TransCanada a federal permit for the pipeline in March and arguing the project will lower fuel prices, boost national security, and bring jobs.

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

An aerial view shows the darkened ground of an oil spill which shut down the Keystone pipeline between Canada and the United States, located in an agricultural area near Amherst, South Dakota, U.S., in this photo provided November 18, 2017. Courtesy DroneBase/Handout via REUTERS

Trump’s decision placed the pipeline’s fate into the hands of the obscure regulatory body in Nebraska, the only state that had yet to approve the pipeline’s route. Permits along Keystone XL’s proposed 1,179-miles (1,897-km) path have been approved in Canada, Montana and South Dakota.

Opposition to the line in Nebraska has been driven mainly by a group of around 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.

A lawyer for the landowners, Dave Domina, said the commission’s decision was a partial victory, because it denied TransCanada its preferred route. But he added: “We will carefully evaluate the Order and meet with our clients.”

Billionaire environmental activist Tom Steyer denounced the commission’s decision. “We will not stop making our voices heard until this project is dead,” he said in a statement.

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.

The project could be a boon for Canada, which has struggled to bring its vast oil reserves to market. But there are questions about demand for the pipeline after a surge in drilling activity in the United States.