WASHINGTON - For the past decade Wall Street has lavished U.S. oil companies with cash, eager to get a piece of the fracking boom that turned what were thought to be undrillable shale fields in West Texas and North Dakota into the hottest oil prospects in the world.

If companies spent billions more than they were taking in, to buy up more acreage and their competitors, not a problem — the money was funding a once in a generation opportunity.

But after a decade of U.S. oil and gas companies spending beyond their means, a debate is underway in the energy and investment sectors on whether to keep pumping money into oil fields to keep the boom going full-speed. Or with interest rates rising and investors demanding better returns, are fracking firms going to have to live within their cash flows?

“The history of the industry is companies spend every nickel they have and a bunch they didn’t have,” said Nick Cacchione, owner of Oil and Gas Financial Analytics, a Florida research firm. “The question is, has the industry changed and have the become more conservative or are they going back to their old ways of doings things?”

FINANCES: As energy companies look ahead, some owe debt to oil bust

Signs point to U.S. oil companies changing their habits, shrinking their capital budgets even as oil prices improve. After running a cash flow deficit totaling more more than $40 billion in 2015 - meaning their operating costs and capital expenditures exceeded the money they were paid - the 60 largest U.S. exploration and production companies shrunk that deficit to $17.7 billion last year.

That followed intense pressure from hedge fund managers who questioned the fundamental economics of the fracking boom. After the first 12 months, the output of shale wells starts declining at a fast clip, requiring companies to drill more and more wells if they are going to keep up production. At an investment conference in 2015, billionaire investor David Einhorn dubbed the oil executives in Houston and Oklahoma City “frack addicts,” proclaiming “a business that burns cash and doesn’t grow isn’t worth anything.”

The tipping point came around 2017 when oil prices were rising, but the share prices of many U.S. fracking companies were flat or falling, as investors lost confidence that companies could live within their means.

“This was the first time there was that disconnect,” said Bill Herbert, a Houston-based managing director at the investment bank Piper Jaffray. “Public equity investors, they’ve become much more demanding of these management teams to live within cash flow and manage their balance sheets more responsibly than five years ago.”

When oil companies first discovered they could use the same hydraulic fracturing and horizontal drilling techniques on oil shale fields that they uses to drill natural gas, they borrowed hundreds of billions of dollars developing oil fields in Texas and North Dakota. But when that surge in production caused global crude markets to plummet in late 2014, many companies couldn’t afford to pay their creditors and were forced to declare bankruptcy, stiffing lenders and investors on more than $70 billion in outstanding loans.

Oil executives appear to have learned the lessons from the oil bust, paying much more attention to financial discipline and focusing on providing investors with higher profits, dividends and stock prices. But will they keep it up?

RELATED: The oil bust force more than 330 North American energy companies into bankruptcy

With oil prices hovering around $70 since May - compared to less than $30 in early 2016 - the temptation is there to increase drilling again. Companies have reduced the extravagant debt loads of a few years ago, but with the Federal Reserve signaling it will interest rates two more times in 2018, raising yields on loans and bonds, plenty of investors will be ready to give oil and gas drillers more money, said Katherine Spector, a research scholar at Columbia University’s Center on Global Energy Policy.

“Banks are going to make more money [through higher interest rates], so they're going to want to get more money out the door,” she said.

While rising oil prices have fixed much of what ailed the industry, companies must now contend with challenges that weren’t much of a factor five years ago.

To start, the historically low unemployment rate is beginning to drive up wages, particularly in West Texas oil towns near the Permian Basin, where unemployment rates are far lower than the national average. The unemployment rate in Midland, for example, is just over 2 percent, compared to 3.9 percent nationally.

The rise in interest rates also means oil companies have to pay more to borrow, putting the days of expanding with cheap money behind them. In addition, the savings oil companies squeezed from new technologies, more efficient production and discounts from contractors may have topped out. U.S. oil executives claim they can drill new shale wells with oil prices as low as $52 a barrel. But, analysts said, it’s unclear if they can keep their costs that low for long.

“The companies have probably reached the depths they can get their operating costs,” Cacchione said. “Cost inflation is starting to creep into the oil patch.”

How it will all turn out is anyone's guess, but there is little doubt that some oil executives will be tempted to expand their holdings, eager to take advantage of the relatively high oil prices. After all, even as a subset of oil companies have focused on raising returns for investors, “growth remains core to the sector’s business model and strategy,” Eric Otto, managing director at Rapidan Energy Group, a Maryland consulting firm, said.

SHALE PLAY: Shale drillers pumping at full tilt

In the months ahead, oil companies will begin releasing capital spending plans for 2019, revealing to investors whether they’re staying conservative or getting back to the high drilling activity of 2015. Cacchione, who has spent three decades tracking the industry, said that with companies still recovering from the oil price crash of late 2014, he is not expecting dramatic increases in spending — at least not yet.

“The blood bath is still pretty flesh in people’s minds,” he said. “At least for another year they’ll be responsible with the money and not go crazy.”