(Bloomberg) -- The Canadian government’s plan to expand a major oil pipeline cleared a key legal hurdle, providing optimism that the project may proceed and sending a lifeline to the country’s ailing energy industry.

The Federal Court of Appeals ruled that Prime Minister Justin Trudeau’s government adequately consulted with indigenous communities along the line’s route and that the regulatory review of the project included all necessary elements.

The ruling signals that one of the final remaining major legal challenges to the highly anticipated project may be overcome, which would help keep construction from being interrupted and allow the expanded line to start shipping oil by its 2022 target. However, the ruling is almost certain to be appealed to Canada’s Supreme Court, said David Austin, an energy lawyer at Stirling LLP in Vancouver.

“People should take a deep breath and wait for the outcome of an appeal,” Austin said in an interview before the appeals court’s ruling was released. “The final judicial review rests at the Supreme Court of Canada level, and until it’s weighed in, the process is not over.”

The Trans Mountain project has been highly anticipated by Canada’s oil producers, which have suffered from a lack of pipeline capacity that has weighed on local crude prices and stymied plans to expand output. The project would boost daily shipping capacity by 590,000 barrels, to a total of 890,000 barrels. Expanding the line, which runs from Edmonton to a shipping terminal near Vancouver, also would open the possibility of developing new markets for Canadian crude in Asia and reducing dependence on U.S. refiners.

--With assistance from Theophilos Argitis.

To contact the reporter on this story: Kevin Orland in Calgary at korland@bloomberg.net

To contact the editors responsible for this story: Simon Casey at scasey4@bloomberg.net, Carlos Caminada, Stephen Wicary

©2020 Bloomberg L.P.