Midcontinent pure-play Gastar Exploration Inc. has entered a restructuring support agreement (RSA) with affiliates of Ares Management LLC, the company’s largest shareholder and only funded-debt creditor, and plans to file for Chapter 11 bankruptcy protection in the coming days.

The pre-packaged bankruptcy comes after months of efforts to sell the company. Gastar hired advisers over the summer to explore strategic alternatives. After private and public marketing processes failed, the board determined that an RSA was the company’s best option. Any interested party, the company said Friday, can still make an offer during the first 30 days of its bankruptcy.

“We can now set our sights on facilitating a smooth, efficient in-court restructuring while continuing to meet our obligations to our employee and vendor constituencies,” said interim CEO Jerry Schuyler.

Gastar said the restructuring would allow it to wipe out $300 million of funded-debt obligations and preferred equity interests, cancel existing common equity interests and provide $100 million in new financing, which it needs to continue operating.

Under the terms of the agreement, Ares would receive $200 million in new take-back term loans and all the common equity of the reorganized company. Holders of existing preferred and common equity would together receive new warrants exercisable for up to 5% of the common equity of the reorganized entity, “so long as they don’t object to, or otherwise attempt to interfere with, the company’s restructuring,” Gastar said.

Ares committed $425 million to the company last year to help it refinance its balance sheet and de-risk its Midcontinent assets. In July, the firm pushed Gastar to either sell the company or find a way to better restructure.

Gastar plans to file for Chapter 11 in the U.S. Bankruptcy Court for the Southern District of Texas. The company said it expects to emerge from the proceedings before the end of the year.

Gastar became a Midcontinent pure-player in 2016 after it sold its Appalachian Basin assets to Tug Hill Inc. for $80 million. It also sold the West Edmund Lime Unit in Oklahoma to focus on other stacked reservoirs in the state. The company operates in the Sooner Trend of the Anadarko Basin, mostly in Canadian and Kingfisher counties, aka the STACK.