Alberta Chief Justice Neil Wittmann has ruled to put lenders ahead of clean-up costs when energy companies go bankrupt.

The Redwater Energy case is one that the energy sector, international investors, bankers, lawyers and regulators were all watching closely.

Redwater was a tiny oil and gas company that went into insolvency in the spring of 2015. It owned a stake in 16 producing oil and natural gas wells, as well as nearly 70 more inactive wells. It owed its bank, ATB Financial, a little more than $5 million.

Redwater's bankruptcy trustee, Grant Thornton, wanted the ability to sell the producing wells in order to pay back debt.

However, the Alberta Energy Regulator (AER) argued that any proceeds from asset sales needed to go first to clean up the mess — namely those 70 non-operational wells, that have not been subject to the costly decommissioning process.

The judge ruled Wednesday that secured creditors, such as banks, have priority over environmental concerns.

"The immediate reaction from the lending community certainly will be a positive because they will have certainty when they lend as to what will be ahead of them and behind them," said David Bish, a partner and insolvency expert with Torys.

The case was heard over two days in December 2015. The decision took five months, as it's widely expected to be appealed.

Abandoned wells in Alberta

The provincial government has several lines of defence against paying well clean-up costs. Healthy companies are required to keep enough assets on hand to cover the cost of decommissioning. Even if that contingency fails, industry funds an Orphan Well Association to do the work.

However, the current recession in the oilpatch has meant a quickly mounting caseload for the OWA. This ruling, allowing the separation of producing assets from those that are not economic, threatens to unleash a wave of costs that could overwhelm the OWA's budget.

The OWA argued in the case that its funding would have to be substantially increased if it had to take on all the bad wells in the province.

AER response

The Alberta Energy Regulator said it is not yet able to comment on the decision. But Bish said the AER could still have some firepower.

The regulator put out a bulletin recently reminding people that it has other ways of going after companies that don't take care of their environmental obligations. That message was aimed at directors and officers of companies.

"The AER has very expansive powers with respect to steps that it could take against directors and officers and those are unquestionably intimidating," said Bish.

"So I don't think that anyone can breathe a sign of relief and feel like -- it's done we don't need to worry about the AER -- they still have teeth."