An Alberta legal battle over whether creditors take priority over the cleanup of old oil wells has landed at the Supreme Court of Canada — with seven justices now tasked with a decision that could have implications for industry and the environment across the country.

The nation's highest court heard the contentious case on Thursday, centred on the failure of Redwater Energy, a junior oil and gas company that slipped into receivership in 2015 in the wake of the oil price collapse.

Redwater's receiver wanted to sell the company's few good wells to pay off the company's debts, but the Alberta Energy Regulator (AER) said such proceeds should help pay to clean up after Redwater's inactive wells as required by provincial regulations.

Two lower court rulings have sided with Redwater's receiver.

But now the Supreme Court will determine if the country's bankruptcy laws are in conflict with Alberta's regulatory regime — and if those federal laws are paramount to the province's environmental rules.

The Supreme Court's decision is expected in spring or summer. Two previous, lower-court rulings have sided with creditors. (Sean Kilpatrick/Canadian Press)

The AER and the Orphan Well Association (OWA), an industry-funded group that cleans up such wells, say billions of dollars in future cleanup costs and Alberta's right to decide how it manages its own resources are both potentially at stake.

"It's not just an issue for the oil and gas industry in Alberta but for all of Canada and all of the resource sectors," Lars De Pauw, executive director of the OWA, said after Thursday's hearing.

"It's really important that regulators be able to enforce rules to protect the public and the environment, even through the insolvency processes. And it's important that creditors have to follow those same rules and someone's not left holding the bag at the end of the day."

But insolvency professionals and banks have long argued they should not be held personally liable for an energy company's activity, warning that reversing the lower court rulings could lead to more orphan wells and potentially decrease the amount of financing available to the oil and gas industry.

We would like to be made whole again. — Ronald Huvenaars, chairman of the Action Surface Rights Association

"The bankers' association supports the 'polluter-pays' concept," lawyer Howard Gorman, speaking for the Canadian Bankers' Association in support of Redwater's receiver, told the court.

"'Polluter pays' doesn't mean polluter's lender pays… It means what it says: the polluter pays."

The case has seized the attention of provinces, environmentalists and the energy industry, each with representatives in court Thursday. They believe the ruling could affect the state of co-operative federalism.

Saskatchewan, British Columbia and Ontario, in submissions to the court, contend that federal bankruptcy laws do not allow a bankrupt company to avoid its environmental remediation obligations.

James Fyfe, with Saskatchewan's attorney general, told the court that the regulatory regime that Alberta developed — and Saskatchewan now uses — is the product of good ideas and regulatory innovation.

"If there's any reform to [Alberta's] regime… it should be because the province sees a better way to protect the public interest, not because the province is having to react against the constraints of paramountcy and the long shadow of bankruptcy law," Fyfe said.

There are thousands of oil and gas wells across the province, like these pumpjacks at work pumping crude oil near Halkirk, Alta. (Larry MacDougal/Canadian Press)

An Alberta farmers group said when a government takes the right to use land away from its owner — like in the case of a mineral lease — the government should maintain its power to protect that land from harm until it is safely returned.

"We would like to be made whole again," said Ronald Huvenaars, chairman of the Action Surface Rights Association, following the hearing.

"It seems to me receivers want to walk away without making surface rights whole again."

But lawyers representing receivers and the banks argue they should be protected from being personally liable for an oil company's activity.

Submissions made on behalf of Redwater's receiver say without the lower court's decisions, the AER would be able to impose liability on court officers, such as receivers and bankruptcy trustees.

If that happened, they might not take on insolvent oil and gas industry companies, which could increase the number of properties with environmental damage left to the public purse, the Canadian Association of Insolvency and Restructuring Professionals said.

"There will be no receiver or trustee overseeing the transition of environmentally affected properties to the [Orphan Well Association], and even properties that may otherwise be cleaned up and sold to… [other] operators will be left to the OWA," the organization said in its filings.

Ryan Zahara, one of the lawyers representing Redwater's primary lender, ATB Financial, said at the heart of dispute is the priority of the Bankruptcy and Insolvency Act.

"We have to have a consistent bankruptcy practice across all of the provinces of Canada, not just Alberta," he said outside court.

"The tenets and… fundamental principles of the Bankruptcy and Insolvency Act need to be upheld in all circumstances and can't be altered or affected in different ways by different regulators in different provinces."

The Supreme Court's decision is expected in spring or summer.