A longtime lawyer for landowners is warning something needs to change or else Albertans could be stuck with an $8-billion environmental cleanup of abandoned oil wells.

A combination of an Alberta court case, federal bankruptcy law and a lack of cleanup deadlines has ballooned the number of orphaned wells that are no longer the financial responsibility of oil companies, lawyer Keith Wilson told the Calgary Eyeopener on Monday.

"That creates a big problem because it begs the question of who's going to pay to clean up all these many thousands of wells that are sitting out there on Alberta's landscape," he said.

Abandoned oil wells can contaminate water and soil, leak greenhouse gases and put nearby homes at risk of explosions and harmful gases, according to a recent study by the C.D. Howe Institute, All's Well that Ends Well: Addressing End-of-Life Liabilities for Oil and Gas Wells.

The wells are "an increasing problem," Wilson said, in large part because in Alberta there is no deadline to remediate a well.

Alberta's recent economic downturn has pushed several oil companies into bankruptcy. In the past five years, the number of such wells without a financially accountable owner has grown from fewer than 100 to 3,200.

In all, the province has about 155,000 oil wells that aren't producing but have yet to be fully remediated, the study found — and cleaning those up could cost an estimated $8 billion.

In Alberta, industry is responsible for funding the cleanup of wells left behind by bankrupt energy companies. However, public money has also been used. Alberta offered a $235-million loan to the energy industry to clean up old wells, with the interest being paid by $30 million from the federal budget.

Listen to Wilson explain why creditors are paid before environmental cleanup:

​

The situation has pushed Alberta's energy minister, Margaret McCuaig-Boyd, to write a host of federal cabinet ministers earlier this month, including Innovation, Science and Economic Development Minister Navdeep Bains, whose department oversees the Office of the Superintendent of Bankruptcy Canada.

In her letter, she asked the federal government to change the bankruptcy laws so that bankrupt companies must fulfil their environmental responsibilities before paying out their secured creditors.

Alberta 'hedging its bets'

Right now, the federal law dictates bankrupt oil companies pay their creditors first.

Alberta regulations say producing wells must be sold to cover environment cleanup costs for non-producing wells.

But in 2015, a small company called Redwater Energy went into receivership — and Alberta's court decided federal bankruptcy law trumps Alberta energy rules.

As a result of the case, oil companies have paid creditors while abandoning environmental cleanup to the Orphan Wells Association or the landowner who allowed the company to drill on their land.

An appeal of the decision was denied last spring by a split decision. Earlier this month, the Alberta Energy Regulator was approved to appeal a court case to the Supreme Court of Canada.

"[The province is] hedging its bets in the case that the Supreme Court of Canada upholds the lower decisions, then they've got another avenue," Wilson said.

Wilson noted the part of bankruptcy law in question was added without fanfare in the late 1990s and accidentally vetoed the province's polluter-pay policy.

"In my view, clearly it was a drafting error," Wilson said. "And it's open for the federal government to fix it and not create a situation where it's the taxpayer and the landowner who are burdened by these things."

With files from Caroline Wagner and the Calgary Eyeopener