VANCOUVER - The Federal Court of Appeal says the Canadian government failed in its duty to consult with aboriginal people before giving the green light to a controversial pipeline proposal to link Alberta's oilsands to British Columbia's north coast.

The court has quashed federal approval for Enbridge's $7.9-billion Northern Gateway project in a written decision dated June 23 but released Thursday by JFK Law, which represents a First Nation involved in the appeal.

The judgment says the government neglected to discuss subjects of critical importance to First Nations by ignoring many of the project's impacts and offering only a “brief, hurried and inadequate” opportunity for consultation.

The pipeline proposal received federal approval in 2014 but has been mired in legal uncertainty ever since.

Eight First Nations, four environmental groups and one labour union launched the legal challenge, which was heard by the appeal court in October.

Northern Gateway would involve the construction of more than a thousand kilometres of pipeline from northeast of Edmonton to Kitimat, B.C., for shipping to international markets.