Shale drillers — some of them just emerging from bankruptcy — racked up a staggering $42 billion in new debt in the first half of the year. It’s not what you think.

America’s oil explorers aren’t repeating the costly mistakes that landed them in hot water with investors, left them almost entirely shut out of debt markets and forced hundreds of them into insolvency over the course of five years. They’re holding the line on production, boosting investor returns and are now attracting the lowest bond yields they’ve ever seen. And instead of using their newly found cheap credit to boom once again, they’re using it to retire costlier debt.

It’s true enough that borrowing costs have plunged across all industries as central banks inject liquidity into their economies. But arguably no sector has benefited from the bonanza of cheap debt more than shale, which about a year ago was on the brink of total collapse — facing a pandemic that sent fuel demand plunging and investors and creditors who, even before Covid-19, had grown weary of waiting for profits.

“We came into this year with too much debt, and we plan to pay debt down,” shale explorer APA Corp.’s Chief Executive Officer John Christmann told analysts and investors last week. “The first priority has been the debt, and clearly we’re on a much faster pace there than we would have envisioned at the start of the year.”

It’s what investors want to hear, and it was repeatedly emphasized by other top producers such as EOG Resources Inc.Pioneer Natural Resources Co. and Continental Resources Inc. in the latest round of earnings calls.

Shale bond yields have swung from record highs to record lows

Average yields on non-investment grade energy bonds plunged to an all-time low of less than 5% last month, from almost 24% in March of last year.

The shale patch has gone from 230 bonds trading at distressed levels in April of last year to less than 15 today, according to Bloomberg Intelligence. The industry is also poised to generate more than $30 billion of cash this year, another record, thanks to a surge in crude prices.

As they push maturities back with newer bonds, energy companies face a much smaller wall of debt between now and the middle of next year, at less than $4 billion, Spencer Cutter, an analyst at Bloomberg Intelligence, said.