Canada's Federal Court of Appeal has dismissed a challenge to a controversial pipeline expansion, a victory for the beleaguered project.
The court says the federal government held "adequate and meaningful" consultations with indigenous peoples, as required by law.
Some indigenous groups had gone to the appellate court to block construction of the Trans Mountain pipeline.
The federal cabinet approved the project last summer.
"While the parties challenging the cabinet's decision are fully entitled to oppose the project, reconciliation and the duty to consult do not provide them with a veto over projects such as this one," reads the court decision, released on Tuesday.
Federal Finance Minister Bill Morneau called the court decision "an important milestone".
The indigenous groups behind the court challenge said on Tuesday they were disappointed but vowed to continue to fight the project.
What is the Trans Mountain project?
The Trans Mountain expansion project would triple the existing 67-year-old pipeline's capacity, increasing its capacity from 300,000 barrels per day to 890,000 per day from Alberta, the heart of Canada's oil industry, to Burnaby, British Columbia (BC).
Canadian Prime Minister Justin Trudeau says the project is in the national economic interests.
His federal Liberals took the rare step in 2018 of buying the pipeline for C$4.5bn ($3.4bn; £2.6bn) from energy infrastructure giant Kinder Morgan in a bid to ensure the project's survival.
The pipeline project has become a hot-button political issue for Mr Trudeau and has faced numerous legal and regulatory hurdles.
Environmentalists, and some First Nations along the route, fiercely oppose Trans Mountain.
Opponents are concerned about oil spills, climate change, and the threat the project poses to the killer whale population off the British Columbia coast.
Supporters see it as a necessary boost for Canada's struggling energy sector - a project that will help fuel the economy for years to come.
A lack of pipeline capacity in the landlocked province of Alberta has forced the provincial government to curtail production to reduce a glut in storage.
A court decision in 2018 quashed earlier approval of the project, saying regulators failed to adequately consult First Nations representatives along the pipeline route and to fully account for the project's impact on the region's endangered killer whales.
The decision launched a new round of consultations with indigenous communities, and the project was sent back for a second regulatory review.
It received federal approval again after project conditions were amended.