(Reuters) - Oil-and-gas producer Linn Energy LLC LINE.O filed for Chapter 11 bankruptcy on Wednesday, becoming one of the biggest victims of global commodity rout, and said it had an agreement with senior creditors to recapitalize the company.

Under the plan with creditors, Linn will spin off Berry Petroleum Co LLC, acquired in 2013 for $4.3 billion to create one of the largest independent energy producers.

The company said lingering weak energy prices prompted the Chapter 11 filing, and it expects its operations to continue while it is in bankruptcy court.

“Like many others in our industry, Linn has been impacted by continued low commodity prices. We believe that these steps will provide us the financial flexibility to successfully manage in the current commodity price environment,” Chief Executive Officer Mark Ellis said in a statement.

Linn Energy, which was founded in 2003 and went public in 2006, has about $10 billion in debt, about twice that of Samson Resources Corp and Energy XXI Ltd, two of the largest oil-and-gas companies to file in the current downturn.

Linn said it had sufficient cash to support its operations during its bankruptcy.

The company was designed as a high-yield energy investment vehicle, which received beneficial tax treatment in return for paying out the bulk of its profits as distributions to its unitholders.

Because of this structure, the company took on significant debt to grow through acquisitions. Since 2006, the company has done 62 deals for a total of around $17 billion to build its asset base.

Linn operates in California, Wyoming and North Dakota shale fields.

Linn said its restructuring support agreement reached with its senior creditors would include a new $2.2 billion reserve-based term loan and a term loan credit facility.

The company is targeting an emergence from bankruptcy by the end of 2016, according to a regulatory filing. However, it appeared the company’s junior creditors opposed the company’s plan and had proposed their own reorganization in which they would have taken control of Linn, regulatory filings showed.

Linn joins dozens of U.S. shale companies that have sought to restructure debt taken on during a frenzy of development in recent years. In the middle of 2014 energy prices began to decline and many companies were unable to meet their debt obligations.

Another struggling energy producer, Sandridge Energy Inc, said on Wednesday it would not file its quarterly results on schedule.