Pump jacks are ubiquitous in Alberta – and have become just as emblematic of the oil and natural gas-focused province as the fields of wheat or canola they sit in.

But this week, the Supreme Court will tackle a case at the heart of the question of who pays to clean up wells that are no longer economically viable, or those already sitting idle in an era of low oil prices.

On Thursday, the Supreme Court will hear an appeal led by the Alberta Energy Regulator on a case focused on whether provincial regulations requiring the environmental cleanup of old wells can co-exist with a federal insolvency law that puts banks and other lending institutions first in line for getting paid when a company goes bankrupt. A 2016 Alberta Court of Queen's Bench ruling on the case of Redwater Energy Corp. allows energy companies or receivers to "disclaim" wells during insolvency proceedings. The case will have far-reaching implications for oil-and-gas companies, lenders and environmental regulators.

Story continues below advertisement

Redwater is a small company that went bust in 2015 owing money to ATB Financial. The previous court rulings gave priority to the interests of secured creditors to collect rather than to the costs of cleaning up old, unproductive wells as required under provincial environmental laws.

The case has attracted a diverse company of intervenors on the side of the appellants, the Orphan Well Association, an industry-funded group that cleans up wells that do not have financially accountable owners, and the Alberta Energy Regulator (AER). They include Ontario, Saskatchewan and British Columbia – which are concerned about their own environmental regulations. Alberta farmers, Greenpeace, Ecojustice and the Canadian Association of Petroleum Producers (CAPP) also back the appellants.

CAPP says the previous rulings pose an unacceptable environmental and safety risk and it does not want solvent oil-and-gas producers that support the Orphan Well Association to be stuck with cleanup costs. Landowners are terrified old wells will be left on their farms. In Alberta, oil companies can receive leases that allow them to drill on privately owned land if they compensate the owners. Many farmers accepted it, trusting they would clean up when they were finished.

"This was never supposed to happen," said Daryl Bennett, a farmer and landowner advocate in Taber, Alta. "We agreed to let society take our land on the condition that you paid us for the inconvenience and you reclaimed it before you went away. Now, you're reneging on both of those promises, you're threatening our livelihoods, you're threatening our safety and you're threatening food safety."

ATB said in a submission to the Supreme Court that a dismissal of the appeal will safeguard the principles and integrity of Canada's bankruptcy and insolvency regime.

It also notes that Alberta's Court of Appeal said if environmental remediation costs get priority over the rights of secured creditors, a "prudent lender in the circumstances would simply walk away from its loans" and "all of the wells would truly become 'orphaned.'"

But the AER and the Orphan Well Association say the lower-court decisions dealt a severe blow to a long-standing environmental regulatory system. The AER said receivers of insolvent oil-and-gas companies can now keep profitable assets and have no responsibility for cleaning up the duds.

Story continues below advertisement

Story continues below advertisement

"This decision has resulted in significant unintended consequences that if not rectified will result in thousands of renounced sites sitting on the landscape, interfering with the ability of innocent landowners and land users to enjoy the impacted sites," the AER's submission said.

The number of Alberta's orphan wells hit 3,714 in January, up from 705 wells in March, 2015.

Alberta requires companies to have enough assets or funds to decommission their own sites. But some environmentalists and farmers say the regulatory regime should be strengthened to prevent the further proliferation of old, unwanted wells.