Canada’s Supreme Court on Aug. 23 dismissed an application by the City of Burnaby, British Columbia to appeal a regulatory decision that allowed expansion work on the Trans Mountain oil pipeline to skirt some bylaws.

Burnaby was seeking to overturn a December ruling by Canada’s National Energy Board that allowed pipeline owner Kinder Morgan Canada to sidestep some municipal permits while building the project. The board found that Burnaby’s bylaw review process caused unreasonable delay.

Burnaby is the end point of the Trans Mountain pipeline system on the Pacific Coast. The city had claimed that Trans Mountain’s applications were incomplete.

The Supreme Court decision removes some legal uncertainty about whether the Trans Mountain expansion can be built. The project still faces other legal challenges—particularly a federal court case on whether there was adequate public consultation.

The Trans Mountain expansion would triple capacity on the existing pipeline from oil-rich Alberta to the British Columbia coast to 890,000 barrels per day, and was approved by the federal government in 2016 despite fierce opposition from environmentalists, aboriginal groups and some municipalities.

Canada’s oil industry said it needs the expanded pipeline capacity to open up export markets in Asia and boost the price of its landlocked crude.

The challenges against the project have been so great, including concerns raised by British Columbia’s left-leaning government, that Kinder Morgan in May announced a sale of the existing pipeline and expansion to the Canadian government.

Kinder Morgan shareholders are scheduled to vote on the sale next week.