A federal court says two First Nations in southern Alberta didn't get a chance to weigh in on the Grassy Mountain coal mine, so it's back on the table.

The court has ordered Canada's Environment Minister Steven Guilbeault to rescind a decision to deny Benga Mining a permit.

The court says the Piikani and Stoney First Nations didn't get the chance they'd been promised by the federal-provincial panel that reviewed the application from Benga.

Guilbeault must now consult with the two First Nations on the potential economic benefits of the proposed mine and then take another look at the original decision.