CALGARY, Alberta (Reuters) - Lawyers in Canada’s energy capital Calgary warned on Friday that a judge’s decision to grant lenders priority over environmental clean-up costs in oil and gas bankruptcies could lead to a surge in orphaned wells in Alberta.

Oil at the first phase of separation from the sand at the Suncor tar sands processing plant near at their mining operations near Fort McMurray, Alberta, September 17, 2014. REUTERS/Todd Korol

An Alberta chief justice ruled this week that proceeds from the sale of assets belonging to junior producer Redwater Energy Corp will go first to secured creditors, rather than towards cleaning up the company’s inactive oil and gas wells.

Redwater became insolvent last May and receiver Grant Thornton wanted to carve out and sell off the company’s 19 producing wells and renounce ownership of 70 non-producing wells.

The Alberta Energy Regulator, overseer of the province’s Orphan Well Association (OWA), which is responsible for cleaning up wells that have no owners, argued that sale should not go ahead unless any proceeds went first toward well decommissioning.

Uncertainty over who is liable for paying tens of thousands of dollars in abandonment costs has hampered energy asset sales in Calgary in recent months.

While Wednesday’s ruling provides clarity for oil and gas lenders, it increases the risk that more of the 79,000 inactive wells in Alberta will end up being the responsibility of the OWA.

“The transactional certainty that arises for lenders will be an advantage,” said Walker MacLeod, a partner at McCarthy Tetrault’s bankruptcy and restructuring group in Calgary. “But we could see more and more wells being orphaned as a result of this process.”

AER spokesman Riley Bender said the regulator was disappointed in the decision and reviewing it.

“The AER continues to assert that companies must not be allowed to walk away from their responsibility, even when facing economic uncertainty,” he added.

Many energy industry players expect the AER to appeal the court’s decision and Ryan Zahara an associate at Blake, Cassels and Graydon LLP, which represented Redwater’s lender Alberta Treasury Branch, said there may still be some uncertainty over well liabilities until then.

Melanie Gaston, a lawyer with Osler, Hoskin and Harcourt LLP, said the ruling could increase pressure on the energy industry to fund well clean-ups. The OWA is currently funded by a C$30 million ($22.87 million) levy on Alberta producers.

“Somebody is going to have to pay for all these additional wells that are sitting as orphans,” she said.

($1 = 1.3120 Canadian dollars)