SandRidge Energy Inc. (NYSE: SD), an Oklahoma City-based oil and gas E&P, is in discussions with its creditors about reaching a debt restructuring deal ahead of a possible bankruptcy filing, according to people familiar with the matter.

The company wants creditors to agree on how the debt would be reduced in the hope that it could limit the amount of time it stays in court if it files for bankruptcy protection, the people said this week. They requested anonymity because the discussions are confidential.

A spokesman for SandRidge did not immediately return requests for comment.

SandRidge had $3.6 billion in debt at Dec. 31, according to its annual report. It has a market capitalization of $70 million. It has an interest payment due June 1, and, while it has missed such payments before, it managed to make them later.

If SandRidge were to seek bankruptcy protection, there is no certainty it would get enough support among creditors beforehand for a prepackaged deal, according to the people. An alternative is a prenegotiated bankruptcy, with some but not all debt investors agreeing on terms, the people said.

SandRidge, started in 2006 by former CEO Tom Ward, a previous executive and co-founder of natural gas company Chesapeake Energy Corp. (NYSE: CHK), said in its annual report in March that it had hired advisers to help evaluate restructuring through Chapter 11.

Dozens of U.S. oil and gas producers have sought court protection from their creditors since 2015.

Last year, SandRidge tried to bolster its balance sheet through actions that included buying back debt at a deep discount and completed exchanges. It was one of many companies that sought to raise second-lien debt. In June it raised $1.25 billion.

The decline of oil prices to below $50 from over $100 almost two years ago hurt SandRidge's cash flow and valuation. The company lost $4.3 billion last year.

The new second-lien debt is trading at around 30 cents on the dollar, according to Thomson Reuters data. SandRidge's unsecured debt is trading at pennies on the dollar, according to Thomson Reuters data.

After SandRidge pulled down the balance of its approximately $500 million revolving credit line earlier this year, its lenders did a special reassessment and cut it to $340 million, according to the annual report.

SandRidge said in late March that it would submit additional oil and gas properties to serve as collateral for the loan.