Through late July, the total debt of the 48 North American E&P companies that filed for bankruptcy protection exceeded the total for all of 2015 by 186%, with the Dallas Federal Reserve president expecting more bankruptcies, mergers and restructurings in the back half of the year.

Analysts tell Hart Energy, however, that the worst is past, at least for the bulk of upstream companies. For those in the oilfield services realm, on the other hand, the next several months could be rough.

“I think the volatility in commodity prices earlier this year led to a wave of upstream bankruptcy filings in April and May,” John Bittner, Dallas-based partner in transaction services for PwC, told Hart Energy. “For the most part, you’ll probably see the majority of the large bankruptcies in the upstream space having taken place already. Now what we see is the service companies trying to outlast the decline in capex by the upstream producers, live on less revenue and less cash flow and still be able to make debt service, and they just can’t do it anymore.”

Haynes and Boone LLP, which tracks E&P bankruptcies in its “Oil Patch Bankruptcy Monitor,” listed 42 companies seeking Chapter 11 protection in 2015 with total secured and unsecured debt of about $17.2 billion. The 48 companies listed by the firm through late July 2016 reported total debt of about $49.3 billion.

Among the significant filings in 2016 are SandRidge Energy Inc. (OTCMKTS: SDOCQ) at $8.26 billion in total secured and unsecured debt; Linn Energy LLC (OTCMKTS: LINEQ) at $6.06 billion; and Breitburn Operating LP (OTCMKTS: BBEPQ) at $5.82 billion.

In 2015, seven companies headed to bankruptcy court with debts of at least $1 billion each and averaged $1.98 billion in debt, Haynes and Boone said. . In the first seven months of 2016, that number jumped to 13, while those companies’ average debt increased to $3.45 billion. But the downcycle’s assault on upstream does not mean that other sectors are necessarily in the clear. Bittner sees some risk for midstream operators, although he doubts that the sector will experience widespread bankruptcies. And downstream is not invulnerable.

“Downstream certainly enjoyed a pretty nice run when commodity prices started declining,” he said. “Now they’re starting to catch the malaise as well. There’s going to be restructuring activity in that space.”

For the data-centric team at Centennial, Colo.-based East Daley Capital Advisors Inc., the filings have been illuminating.

“Every time there’s a bankruptcy filing, we get more data, more actual facts to go in and figure out the actual risks behind the companies,” CEO Jim Simpson told Hart Energy. “E&Ps are doing exactly what we’ve seen every cycle: ‘Let’s shed the stuff that’s not working as well, or I like to say, that we speculated on when times were good;’ and let’s hunker down and focus on what we know best and where we know best.”

The amount of filings has also inspired some resourceful strategy on the part of some bankrupt companies.

“We’ve seen Chesapeake [Energy Corp. (NYSE: CHK)], because of their bankruptcy ‘leverage,’ go in with a pretty good-sized baseball bat and renegotiate with some pretty big players like Williams, like Energy Transfer,” Simpson said. “It’s a clever way to refinance when the capital markets are really charging you a lot but you can’t issue equity.”

Bittner sees that, too, in certain cases.

“The leverage has always been, before nine to 12 months ago, with the midstream company,” he said. “Because of the Sabine [Oil & Gas Corp.] decision, leverage has shifted from midstream to the E&P.”

Sabine, which recently emerged from bankruptcy, filed for Chapter 11 in July 2015 and requested the right to reject contracts with its midstream counterparties that it argued it could not afford. The bankruptcy judge agreed.

Not all cases will follow that format, however. Bittner cited a midstream client facing possible contract rejection by an upstream company in the Bakken. The threat faded, however, because the bankrupt upstream company, unlike Sabine, had no other gathering and processing options to get its product to market.

“I think you’ll see a number of these gathering and processing agreements get renegotiated,” he said, “rather than outright rejected.”

To their credit, E&Ps have shown considerable resilience, Justin Carlson, East Daley’s vice president and managing director for research, told Hart Energy. A bankruptcy for struggling Chesapeake, which arranged for a $1 billion loan on Aug. 15, could have serious consequences for its numerous midstream counterparties.

Bittner said he is impressed as well, noting that many took swift action to cut opex and capex. Oilfield service companies have been particularly aggressive about lowering prices, he said.

PwC expects further consolidation for the remainder of 2016, which Bittner sees as necessary in certain situations. What could complicate matters is a lack of access to capital.

“In the middle market space, there is a lot of consolidation out there that is ripe to happen,” he said. “What is keeping it from happening is the inability to finance a transaction because there is limited capital available, primarily senior debt capital—even junior debt capital.”

A more active stance by the financing market could remedy this, he said, but lenders are wary of commodity price volatility and declining asset values. Unless finance markets improve, the industry will need to hang tight.

“You’ll see bondholders owning companies,” Bittner said, “and companies shrinking down and trying to weather the storm until economics improve for the industry.”

Joseph Markman can be reached at jmarkman@hartenergy.com and @JHMarkman.