Construction on a section of Kinder Morgan's Trans Mountain expansion. Courtesy of Trans Mountain Expansion Project

The Federal Court of Appeal voided the final approval of the $7.4-billion Trans Mountain pipeline expansion, ruling that the National Energy Board’s review of the project was not sufficiently broad, and that the federal government did not adequately consult First Nations groups.

Justice Eleanor Dawson found in her decision that the majority of the claims in the casea combination of several lawsuits from First Nations and environmental groups, and two British Columbia citieswere “without merit” and dismissed all claims specifically against the NEB’s report because the board cannot be subject to judicial review.

But she did agree that the board made a “critical error” in not considering project-related tanker traffic as part of its review, and that the federal government, as a result, could not have relied on it for its final decision.

Dawson also ruled that in the third phase of consultation, the duty to consult with First Nations “was not adequately discharged.”

The decision approving the pipeline expansion will be sent back to the federal government “for appropriate action, if it sees fit, to address these flaws and, later, proper redetermination.”

Finance Minister Bill Morneau said at a press conference in Toronto that the federal government was reviewing the decision “carefully” and considering its next steps, and would respond “promptly and in a meaningful way” as the court requested.

Less than an hour after the decision was released, Kinder Morgan Canada shareholders approved the company’s decision to sell the expansion project to the federal government for $4.5 billion.

According to a report from the CBC99 per cent of shareholders agreed to sell the pipeline, leaving Canada with a project in legal limbo. Construction on the project, which had begun this summer, will have to be halted until the project can be re-evaluated.

Related: Tsilhqot’in Nation calls on B.C. NDP to revoke Taseko permit after B.C. Supreme Court dismisses petition

This lawsuit was the biggest challenge to the federal government’s approval of the pipeline to date. The Tsleil-Waututh Nation, the primary plaintiff in the case, had their suit combined with those from five First Nations groups, two environmental organizations and the cities of Burnaby and Vancouver. B.C.’s NDP government, which has pledged to use “every tool available” to stop the pipeline construction, had also joined the case as an intervener. The Alberta government also registered as an intervener for the federal government.

The First Nations plaintiffs argued that the NEB consultation during its review of the project was not adequate, and that the government infringed on their aboriginal rights and title. The Raincoast Conservation Foundation and the Living Oceans Society, the two environmental groups, allege the NEB and Cabinet failed to protect endangered orca whales, in violation of the Species at Risk Act. Burnaby and Vancouver argue that the board did not provide sufficient testing or alternative options for the pipeline expansion, and failed to follow procedural fairness in its decision.

Several other attempts at halting the pipeline expansion have been dismissed by the courts. A lawsuit by the city of Burnaby, where the pipeline terminates, claimed that Kinder Morgan had bypassed local bylaws in the construction of the pipeline expansion, but was dismissed by the Supreme Court last Thursday.

Similarly, the Squamish First Nation and the City of Vancouver alleged that they had been inadequately consulted when the previous B.C. government granted the environmental assessment certificate for the project. The case was dismissed in May by the B.C. Supreme Court, which ruled that the province had acted with due diligence in awarding the certificate.

The project’s expected cost has risen several times from its original $4.1 billion, and Kinder Morgan’s most recent estimates have pegged it at $7.4 billion. But financial documents released earlier this month reported that the capital costs could increase to more than $9 billion.

The controversial expansion project, first approved in 2016, would almost triple the pipeline’s current capacity to 890,000 barrels per day, up from 300,000 currently.