Top U.S. milk processor Dean Foods Co. filed for Chapter 11 bankruptcy and is in advanced talks with Dairy Farmers of America Inc. about a potential sale.

Dean listed assets and liabilities of as much as $10 billion each in court papers filed in Houston, and said in a statement it has commitments for $850 million in bankruptcy financing from existing lenders led by Rabobank. The filing allows Dean to keep operating while it works on a plan to pay creditors and turn the business around.

Losses have piled up after Dean’s biggest customer, Walmart Inc., built its own milk plant. Dean says it’s the largest U.S. processor of fresh fluid milk and other dairy products, but the company has been squeezed by fierce competition and the rising price of milk, which has eroded profit margins.

Demand for cow milk has been weak, too, with nut milks and even bottled water cutting into its popularity. On top of that, retailers have been selling their own house brands of milk at a loss to increase store traffic, Hoai Ngo of Bloomberg Intelligence wrote in a note.

Dean shares have tumbled 79% this year, the worst performance among peers tracked by Bloomberg, and trading hadn’t resumed as of midday Tuesday. Its bonds dropped to fresh lows, plunging to as little as 14.5 cents on the dollar, according to Trace pricing data. As recently as January of last year, the bonds were trading at full value.

The Dallas-based company’s filing and debtor-in-possession financing reduces the recovery value for debt holders and “could drive prices lower,” Ngo wrote.

A transaction between Dean and Dairy Farmers of America is still under review, and no agreement for the purchase of Dean’s assets has been reached, DFA Executive Vice President Monica Massey said in an emailed statement to Bloomberg. Other bidders may emerge during the bankruptcy process, Massey said, adding that DFA’s offer would be contingent upon various approvals, including a review of Dean Foods’ assets and clearance from U.S. antitrust regulators.

DFA monitored Dean’s financial performance “closely since the business began showing signs of distress” and began “preparing for various scenarios, including a bankruptcy filing, in order to minimize the impact,” Massey said.According to Rabobank, Dairy Farmers of America is the sixth-biggest dairy company in the world by sales, and Dean Foods is No. 11.

The Central States Southeast & Southwest Areas Pension Plan is listed as the company’s largest unsecured creditor, with a $722.4 million claim alongside Dean’s $700 million of unsecured notes that mature in 2023.

Dean’s bankruptcy was the “clearest option” for addressing the pension and debt load, Wells Fargo equity analyst John Baumgartner said in a note. Challenges in the milk category on top of the unfunded pension liabilities were “too much to overcome,” he said.

Dean has been hemorrhaging executives as well as cash, with Chief Financial Officer Jody Macedonio and general counsel Russell Coleman stepping down in September. Vice President of Commercial Finance Scott Mills joined another company last week.

Chief Executive Officer Eric Beringause, who joined the company about three months ago, said the current path, led by a new senior management team, would lead to a turnaround.

Dean expects to report a cash loss of $286 million for a 10-month time-frame through August of 2020, according to recent financial projections. The budget also predicts around $15 million of cash on the balance sheet by the end of the period.

Davis Polk & Wardwell LLP and Norton Rose Fulbright are serving as legal advisers to Dean Foods, while Evercore is serving as investment banker, and Alvarez & Marsal is its financial adviser.

The case is Dean Foods Company, 19-36314, U.S. Bankruptcy Court for the Southern District of Texas (Houston).