Editor’s Note: The following article was originally published at privcap.com.

The number of mergers and acquisitions among energy players has been on the rise in the second half of 2016. The reason: many energy companies are finally at the end of their ropes.

Emanuel Grillo, a partner at law firm Baker Botts LLP, said many potential sellers were able to survive the early days by selling some assets and negotiating with lenders. Two years in, those options are starting to dwindle, and sellers are now realizing that the price being offered today for their assets may be the best they’re likely to get.

“We’ll see more out of that [scenario] over the next six months,” he said.

That’s driven in part by significant pent-up demand among oil- and gas-focused private-equity (PE) funds, and the growing unwillingness of traditional lenders to further modify terms.

“There was a ton of PE money and distressed hedge fund money raised to chase these assets,” he continued. “There’s some stability in the market.”

The first round of companies to break under the pressure of sinking oil prices were those in the E&P business.

This year, there are more oilfield services-related businesses filing for bankruptcies, Grillo said, and he’s seen a lot of pre-packaged bankruptcies being done because companies can’t sustain existing debt loads. And there will likely be more bankruptcy filings from service companies because, although many people think the worst is over, “not everyone’s out of the woods just yet,” he said.

From a deals perspective, things began to turn in February when the market—and prices—hit a low. Producers then slowly started to climb back, and potential buyers took another look.

“There was confidence in the market and prices,” Grillo said. “We started looking at what transactions we could put together. What you’re starting to see is some straightforward transactions taking place in the Permian. We could see people starting a roll-up strategy. Even if prices don’t increase through the end of the year, [people see a] solid floor beneath them right around $50 a barrel.”

As time wears on, there’s little doubt that companies that haven’t restructured will have to decide how to move forward.

“At some point, their debt will come due, and the question is if they’re able to refinance, be proactive and able to restructure debt,” he said. “Fifty-dollar oil will not solve everyone’s problems. They’ve survived the worst of it, and then it’s, how do you move beyond that and grow? People that have been in survival mode see a break in the clouds.”