OTTAWA -- The federal government is studying the best options for Indigenous communities to reap economic benefits from the Trans Mountain pipeline but Ottawa is not planning to sell the project while legal and political risks remain.

The Supreme Court of Canada eliminated one of those risks Thursday when it denied British Columbia the right to regulate the contents of the pipeline. At least two other significant legal challenges continue to hang over the project, making its future far from certain.

They both question the validity of the cabinet endorsement given to the expansion project last June, one citing environmental concerns and the other mistakes made during consultations with Indigenous communities. If either challenge succeeds in overturning cabinet's approval, it would stop construction for a second time and put the entire project on extremely shaky ground.

The expansion involves building a second pipeline roughly parallel to the existing one that runs between Edmonton and Burnaby, B.C. The original pipeline will carry refined oil products and light crude. The expansion is meant to carry only diluted bitumen, a heavy crude oil produced in Alberta's oilsands, for export.

Early stages of construction began after the expansion was first approved in 2016, but all of that ground to a halt in August 2018, when the Federal Court of Appeal tore up cabinet's approval. The court ruled Ottawa hadn't properly consulted Indigenous communities or adequately considered the impacts the project would have on marine life off the B.C. coast.

After another round of Indigenous consultations and a second look at marine impacts, cabinet approved the expansion again last June, with construction resuming later that summer. The first lengths of pipe were put into the ground before Christmas, with plans for more pipe and work on several terminals and pumping stations to be underway over the next six months.

The federal government is now the sole owner and operator of the pipeline, through the Trans Mountain Corporation, a Crown agency. That purchase came after Kinder Morgan Canada got cold feet about proceeding in the midst of multiple court challenges, including B.C.'s attempt to keep heavy oil out of the pipe. The Supreme Court's decision Thursday ended the case, reaffirming the pipelines running between provinces are entirely within the jurisdiction of the federal government.

Pierre-Olivier Herbert, director of communications for Finance Minister Bill Morneau, said Friday Ottawa will remain the sole owner of the pipeline as long as any risk remains to construction of the expansion.

“When the political risks made it too difficult for the private sector to move forward, our government acquired the Trans Mountain expansion project and related assets,” Herbert said. “We have been clear however that it is not our intention to be long-term owners of the project.”

There are at least three Indigenous organizations vying to buy the pipeline, or at least a majority stake in it, but the government is not officially accepting offers at this point. There are 129 Indigenous communities potentially impacted by the pipeline, and not all of them are part of the three well-organized groups. Some of them are working to stop the pipeline altogether.

Last summer officials at the Department of Finance held an “initial engagement” with nearly six dozen Indigenous communities situated along or near the pipeline's 1,150-kilometre route. It is now working to refine the potential models for Indigenous participation raised in those consultations. That could mean securing employment benefits, revenue sharing, or an equity stake in the project.

“It is important that Indigenous communities have an opportunity for meaningful economic participation while we hold to our commitment of investing in a way that benefits all Canadians, and that operates the project on a commercial basis,” Herbert said.

All of that could be for naught if the Federal Court of Appeal agrees with eight First Nations that the federal government did not fulfil its duty to consult them. Most of them were part of the first successful challenge that halted construction in 2018 and argued in a hearing in December that the second round of consultations was a smoke screen created by a federal government that had every intention of approving the project again.

The Federal Court of Appeal has reserved its judgment in that case.

It refused to hear a challenge of the cabinet approval from Indigenous communities and two environment groups who alleged the government was violating the Species at Risk Act because the pipeline would harm the highly endangered southern resident killer whales.

The environment groups and some of the First Nations are now appealing to the Supreme Court to hear the case.

This report by The Canadian Press was first published Jan. 17, 2020.