(Bloomberg) -- Marathon Oil Corp. used to represent everything that was wrong with U.S. shale: enormous debtloads, lavish executive pay and a seeming willingness to spend whatever it took to boost output. The company hemorrhaged money, and the stock plunged 84% from a peak in 2014 through the end of last year.

This year, CEO Lee Tillman took a different tack. He cut his own pay 25%, got rid of its corporate aircraft and with oil output down 20% after the pandemic, pledged to leave it there. The result? The stock doubled this year. Its peers are doing well too. U.S. wildcatters are the second-best performing sector in the S&P 500 Index.

After years of booms and busts that produced astronomical losses along with a whole lot of oil, the fracking industry seems to have found a sweet spot. It’s poised to generate more than $30 billion of free cash this year, a record, according to Bloomberg Intelligence. While that’s just a blip compared with the $300 billion that Deloitte LLP estimates the sector burned over the previous decade, it marks at least a temporary revival for an industry that a year ago had been largely written off by investors.

For sure, frackers have benefited from the 50% run-up in global oil prices this year as demand roars back in places where the pandemic has receded. Just as important to their bottom lines, though, has been the ability to hold back on new supply, to avoid drilling the more marginal wells they would have in years past. They’re saving cash instead of spending money to ramp up output at all costs.

It’s a turnaround from the early days of the shale revolution a decade ago, when new horizontal drilling and hydraulic fracturing techniques unlocked vast oceans of crude from rock previously considered impermeable, loosening the OPEC cartel’s grip on global production.

Back then, with oil trading over $100 a barrel and global concerns of shortages, lenders and stock investors rewarded companies for high production. Profits would naturally flow later, so the thinking went. But the industry was a victim of its own success, pumping more oil than anyone needed.

“The shale boom oversupplied the world and crushed prices,” Dan Pickering, founder and portfolio manager at Pickering Energy Partners in Houston, said in an interview. “Shale is not going to do that in 2022 and 2023. It’s cautious optimism, the feeling that ‘the worst is past.’”

READ: Saudis Bet ‘Drill, Baby, Drill’ Over in Push for Pricier Oil

The key to the transformation? A lot less oil. Shale’s first era from 2010 to 2014 was marked by explosive growth fueled by the technology breakthrough, and the second stage from 2015 to 2020 saw prices fall but output soar amid heavy spending. Now Shale 3.0, as some investment banks have called it, is all about free cash flow.

The U.S. is pumping about 1.9 million fewer barrels a day since Covid-19 caused prices to tumble last year, a reduction that’s bigger than Nigeria and Venezuela’s production combined. That’s bad for consumers -- creating higher prices at the pump -- and is a boon for the producers of OPEC+ as it gives the coalition led by Saudi Arabia and Russia more room for maneuver to bring back their own production. But it’s also set the domestic shale industry on a more sustainable path, directly to the benefit of equity and bond investors.

“From a financial perspective, shale is entering a new, better era, with higher profitability,” said Elisabeth Murphy, ESAI Energy LLC upstream analyst for North America.

For much of the past decade, shale producers spent every dollar they earned and borrowed extra to drill new wells. Producers would typically reinvest 120% to 130% of their operating cash flow in new production, according to Noah Barrett, a Denver-based energy analyst at Janus Henderson. Now, that figure is closer to 70% or lower, leaving plenty of cash for shareholder payouts.

Marathon, for example, expects to generate $1.6 billion of free cash flow from just $1 billion of capital spending, allowing the company to raise its dividend and reduce debt.

The optimism is also apparent in the bond market, where an index of junk-rated independent U.S. oil producers has returned 10% this year -- three times the average for high-yield companies -- as borrowing costs fell to a record.

READ: Shale’s Private Army Ramping Up Means Supply Wild Card for OPEC

Consolidation is also helping the industry. Devon Energy Corp. merged with WPX Energy Inc. earlier this year to cut costs. The combined company is producing 8% less oil than a year earlier and has promised to pay a variable dividend on top of its regular payout. Pioneer Natural Resources Co. has completed two deals this year and says it will cut growth rates from both acquired companies.

There’s a risk that the discipline among shale producers may start to weaken if oil prices remain above $70 a barrel, particularly for companies that have used the last six months to pay down debt. At current prices, drillers may be able to invest a bit more in 2022 while still rewarding investors. IHS Markit Ltd., a consultancy, estimates that the U.S. shale industry is on track to hike spending from $58 billion in 2021 to $80 billion in 2022.

“The early signs are that discipline is holding, but we still need to watch this pretty closely,” said Jeff Wyll, a fund manager at Neuberger Berman, which has about $400 billion of assets under management. “There’s a hyper sensitivity toward any company that’s shifting back toward growth mode.”

An example came in February, when EOG Resources Inc., the biggest independent shale producer, signaled plans to boost production by as much as 12% in 2022. Retribution was swift. The shares tumbled 8.5% the next day, wiping out $3.5 billion of market value.

©2021 Bloomberg L.P.