The Supreme Court of Canada ruled on Thursday that bankrupt Alberta energy companies cannot walk away from orphan wells on agricultural lands without cleaning up behind them.

The 5 - 2 ruling overturns an Alberta Court of Appeal ruling that upheld a 2016 Alberta Court of Queen's Bench decision that effectively allowed a bankrupt energy company to sever its connection with unprofitable and unreclaimed wells when the company's assets were sold off to creditors.

On Thursday, the high court ruled that the bankruptcy trustee, Grant Thornton Ltd., cannot walk away from its end-of-life obligations to render abandoned wells environmentally safe.

Chief Justice Richard Wagner, who wrote on behalf of the majority, said Parliament might want to clarify the confusion between federal bankruptcy law and provincial jurisdiction over the environment and energy sector and re-examine the provision ‘given the confusion caused’ in this case.

"Bankruptcy is not a licence to ignore rules, and insolvency professionals are bound by and must comply with valid provincial laws during bankruptcy," Wagner wrote.

The province’s energy regulator ordered the trustee for Redwater Energy Corporation to comply with end-of-life requirements to render the abandoned properties environmentally safe.

The company's trustee did not comply and filed its own counterclaim that included a constitutional challenge to the regulator's order.

The Alberta Court of Appeal upheld the ruling and since the case went to court, an estimated 1,800 wells have been abandoned, representing more than $100 million in liabilities.

The energy regulator and the Orphan Well Association, an industry-funded group that cleans up wells that have been left unreclaimed, appealed the ruling to the high court.

The Pembina Institute released a statement on the ruling on Thursday saying …

"The Supreme Court of Canada has prioritized paying clean up costs before creditors when extractive companies go bankrupt. This outcome reinforces the growing understanding that polluters are responsible for their clean up obligations.

“However, the Supreme Court's decision does not alleviate broader challenges posed by insolvent operations. While the Supreme Court's decision ensures bankrupt companies' remaining assets first go to clean up, those assets are often insufficient to cover full costs. Canadian taxpayers are already paying billions to clean up former operations including the Faro Mine in the Yukon, the Giant Mine in the Northwest Territories, and numerous mines in B.C.”

Energy Minister Margaret McCuaig-Boyd responded to the decision at a press conference in Calgary.

“We’re pleased and encouraged this morning that the Supreme Court of Canada ruled in favour of the polluter-pays principle, which is critical to Alberta’s role as a responsible energy producer,” she said. “The court’s decision means Albertans are better protected from the few irresponsible producers and operators in the system.”

McCuaig-Boyd quoted a line from the ruling that stated ‘bankruptcy is not a licence to ignore rules’ and said that the court got the decision right.

“Working families across this province, as well as all of Canada, should not have to pay for the financial and environmental liabilities left behind when companies walk away from their obligations. I want to be clear that the vast majority of companies are responsible, they play by the rules and they as well need to be protected from the bad actors in the system,” she said. “Upholding the polluter-pays principle is good news for Albertans and it’s good news for Canadians.”

The Orphan Well Association said in a statement that it was also encouraged by the decision and that it ‘remains dedicated to reducing our current inventory of sites to be decommissioned and reclaimed.’

The OWA says it hopes to decommission over 700 wells in the current fiscal year.

The organization says that it expects to address more sites this year than planned but that most of the sites are low risk and don't require immediate attention.

The AER (Alberta Energy Regulator) said in a release that it was also pleased with the ruling and that the public should not ‘be on the hook for the closure and reclamation costs of insolvent licencees’.

Gordon Lambert, President & CEO, said the AER can now move forward with building a new liability management framework and that he is confident the regulatory system will be stronger as a result.

(With files from The Canadian Press)