The troubled oil and gas industry has been a big factor in driving global corporate defaults to their highest rate in seven years.

Four more companies defaulted this week, bringing the overall tally to 40 so far this year, the ratings agency Standard & Poor’s said Friday in a research note. The last time defaults hit such heights was in the depths of the global recession in 2009.

About one-third of that total, or 14 defaults, came from oil and gas companies, which are struggling to pay off debt acquired when oil prices were higher. U.S. crude prices are down more than 60 percent from their June 2014 peak of $105 a barrel, trading at around $39 a barrel Friday. Investors now face tens of billions of dollars in energy defaults as the worst oil crash in decades leaves drillers struggling to stay afloat.

Data curated by FindTheData

U.S. companies saw the highest number of defaults, with 34 of the total thus far in 2016. S&P in February lowered its ratings on Paragon Offshore PLC to "D," or "default," after the Houston company said it was filing for Chapter 11 bankruptcy protection and had entered talks with bondholders and other creditors. The ratings agency also slapped a D rating on Energy XXI Ltd., which said in March it would delay two interest payments on loans worth a combined $1.54 billion.

Despite the gloomy days, some investors are still banking on a near-term recovery. Investors issued around $8.9 billion in equity to U.S. oil and gas companies in the first quarter  — a more than tenfold jump above the $0.8 billion in equity issued in the same period last year, the Carbon Tracker Initiative said Wednesday in a report, citing Bloomberg data on 60 exploration and production companies.

Gerard Wynn, a co-author of the report and director of U.K. energy consultancy GWG Energy, said the surge in equity finance suggests investors are expecting oil prices will regain some ground this year.

Oil Equity Investors issued $8.9 billion of equity to U.S. oil and gas companies in the first quarter of 2016, up from $0.8 billion for the same period in 2015. (WTI is West Texas Intermediate, the U.S. oil price benchmark.) Photo: Carbon Tracker Initiative But predictions on where oil prices will move are all over the map. The International Energy Agency suggested in March that crude might have “bottomed out” at January lows of below $30 a barrel. Dominick Chirichella, co-founder of the Energy Management Institute in New York, said in an interview that oil prices might reach $50 a barrel later this year but higher prices might encourage more drilling, exacerbating the supply glut that brought prices down in the first place. That would bring prices back down again.

“If equity investors are simply looking at this as an opportunity for a bargain because they think the oil price has bottomed out, then that would be a mistake,” Wynn said. “Higher oil and gas prices are not going to bail out all of these companies, because of the impact the collapse has had in the past 12 months.”

Beyond oil and gas, the S&P tally on global corporate default found the mining, metals and steel sector accounted for eight defaults this year. The overall default tally for the same time last year was 29, the ratings agency said.