Last spring, a small oil and gas company called Redwater Energy went belly up.

All in all, we're talking pretty small potatoes. Redwater was operating out of its chief executive's home on a country road outside Calgary. It owned a stake in 16 producing oil and natural gas wells, as well as nearly 70 more inactive wells. It had some mineral rights on undeveloped land and it owed its bank, ATB Financial, a little more than $5 million. 

This relatively small bankruptcy case has turned into a very big deal.

Alberta Energy Regulator (AER) and the provincially owned ATB are fighting over who gets priority over the remains of Redwater Energy. 

Does the lender get paid back first?

Or should proceeds from any asset sales go to clean up the mess — namely those 70 non-operational wells that would otherwise be abandoned —  the company leaves behind?

That question was argued at length in December, at a hearing that was presided over by Alberta's chief justice. The answer stands to set a precedent at a time when many junior oil and gas companies are struggling.

If the lenders win this case, the concern is that worthless oil and gas wells will be abandoned across the province as juniors fold. If the AER wins, there will be a chill on lending, as banks lose any certainly that the loans they make are properly secured.

Orphaned well

The Orphan Well Association is funded by industry to reclaim abandoned wells like this one. It has been overwhelmed in the past year, as the number of abandoned wells under its umbrella swelled from 162 to more than 700. (Orphan Well Association)

Number of abandoned wells skyrockets to 700

When Redwater Energy became insolvent in May, Grant Thornton was named as the receiver. The company wanted the ability to sell its producing wells and renounce the non-operational wells, making them the responsibility of the Orphan Well Association.

The OWA is funded by industry to reclaim wells that have been abandoned by companies that simply don't have the cash or assets to pay for reclamation.

The OWA has been overwhelmed in the past year, with the number of abandoned wells under its umbrella rising from 162 to more than 700. It worked frantically over 2015 and reclaimed more than 100 wells, but expects to add hundreds more to the list this year.

The association's industry funding doubled this year to $30 million, but it argued in its court brief that funding would have to be substantially increased if it had to take on all the bad wells in the province.

Should companies pay security deposit to drill well?

The AER's basic argument is that when a company is granted a license to drill, the obligation to reclaim that well is part of the package, so any remaining funds need to go towards reclamation.

The argument of Grant Thornton and ATB is that once an energy company becomes insolvent, the regulator becomes another creditor.

They argue the AER cannot shift the obligation of plugging and reclaiming the well onto the company's creditors and that bankruptcy law is fairly clear on this point. 

Barry Robinson, a staff lawyer with EcoJustice in Calgary, says the clear solution is to have companies pay a security deposit before they drill a well.

"This would provide an incentive for all licensees to abandon and reclaim wells in a timely manner in order to reclaim their security deposit," he said.

Robinson says if the company goes under, the regulator can use the security deposit for reclamation.

The judge overseeing the case reserved judgement in December, saying he would come to a decision as quickly as possible and that he expected an appeal, no matter what the decision.