Companies that drill wells, haul water and provide other services to energy exploration firms have been waiting out a slump in oil prices by idling machinery, laying off workers and extending deadlines for repaying debts.

Now they are turning to Chapter 11 creditor protection to shed debt and raise cash so they can spend and invest again.

Without bankruptcy, many of small and medium-sized service companies risk missing out on any upturn that could follow President-elect Donald Trump's pro-drilling agenda or OPEC's plan to cut oil production for the first time in eight years, restructuring advisors said.

"You've got some zombie companies out there," said Jay Krasoff, a managing director with Chiron Financial in Houston. "You have to give counterparties confidence you'll be in business to do their work. That's what's going on."

Through the end of October, about 70 mostly private energy service companies have filed for Chapter 11 this year, up from 39 in all of 2015, according to Haynes & Boone, a law firm that specializes in energy restructuring.

As the pace of filings accelerates, the size of companies restructuring in bankruptcy is also increasing.

In June through October, nine companies with at least $100 million in debt filed for Chapter 11, with a total of $9 billion in liabilities, according to Haynes & Boone. That exceeded the total for the prior 18 months, which came to $8.2 billion in debt from seven filings with at least $100 million in debt.

In all, energy services companies have restructured about $18.7 billion in bankruptcy. By comparison, the 20 companies in the Dow Jones U.S. Oil Equipment & Services Index <.DJUSOI> have a combined $82.6 billion in debt, according to Thomson Reuters data. (Graphic: http://tmsnrt.rs/2ftVbQ2)

COMPETITIVE ADVANTAGE

The biggest oilfield service providers - such as Halliburton Co (>> Halliburton Company) and Schlumberger Ltd [SLB.UL] - have the scale to ride out the production glut, despite losing more than 40 percent of their revenue since oil prices peaked in mid-2014.

In a recovery, they can also respond more quickly than smaller companies that spent the past two years hibernating through the downturn, according to restructuring advisers.

Hoping the energy sector has turned a corner, major U.S. producers such as Occidental Petroleum Corp (>> Occidental Petroleum Corporation), Chevron Corp (>> Chevron Corporation), Pioneer Natural Resources Co (>> Pioneer Natural Resources) and ConocoPhillips (>> ConocoPhillips) are preparing to add rigs.

A bankruptcy filing allows a service company to restructure under a court-supervised process in as little as two months. Creditors generally take ownership of the companies in return for forgiving debt, and shareholders generally lose all or nearly all of their investment.

"From a competitive advantage a lot of the service companies had to do that," said Steven Person, the chief executive officer of exploration company American Standard Energy.

Person has served as an officer and director of energy service companies, including until 2004 at Basic Energy Services Inc (>> Basic Energy Services, Inc), which completes oil and gas wells and transports and disposes of fluids.

Basic Energy filed for Chapter 11 in October with a plan backed by its creditors to convert $825 million in debt to equity and raise more than $100 million in cash. Its confirmation trial is on Friday.

David Johnston, a managing director of AlixPartners, has been advising Basic Energy and said in court papers the company opted to file for bankruptcy in part because competitors were.

"Several of Basic's competitors have delevered their own balance sheets through Chapter 11 processes, thus forcing even solvent companies to explore similar options to remain competitive," he said.

Two of Basic's main competitors, Key Energy Services Inc (>> Key Energy Services, Inc.) and C&J Energy Services Inc, filed for bankruptcy in recent months. Key won court approval on Tuesday to cut $1 billion of debt to $250 million and exit bankruptcy and C&J's confirmation trial is set for Dec. 16.

Seventy Seven Energy Inc , which provides drilling and hydraulic fracturing, or fracking, services, filed for Chapter 11 in June. By early August, the company had cut its debt by $1.1 billion and exited bankruptcy under the control of its creditors.

The company said in its recent quarterly results that it had doubled its rig count in the past six months.

About half of some 32 oilfield service companies still trading actively in major stock exchanges are distressed, including five or six that are severely distressed and likely to restructure, said Kim Brady, a partner and restructuring adviser at financial consultancy Solic Capital.

Restructuring advisers said the stigma previously associated with Chapter 11, which tended to hit companies with serious problems, has vanished, opening the door to more bankruptcy filings.

"Now it's almost in vogue to be going through Chapter 11," said Jerrit Coward, former CEO of fracking services provider US Shale Solutions LLC who is now advising energy investors.

(Reporting by Tracy Rucinski in Chicago and Tom Hals in Wilmington, Delaware; Editing by Noeleen Walder and Tomasz Janowski)

By Tom Hals and Tracy Rucinski