Mall owners Simon Property and Brookfield Property Partners have reached an agreement in principle to acquire JC Penney out of bankruptcy proceedings in a deal valued at approximately $800 million, sources told the Wall Street Journal. The move will avoid a total liquidation and save about 70,000 jobs and 650 stores, Joshua Sussberg, a lawyer representing Penney for the Kirkland & Ellis said in bankruptcy court Wednesday.

Simon and Brookfield will pay roughly $300 million in cash and assume $500 million in debt, Sussberg said during a court hearing, according to CNBC.

Simon and Brookfield, J.C. Penney’s landlords, will own about 490 of the retailer’s remaining 650 stores, sources told the Journal

At the same time, the hedge funds and private-equity firms that have financed Penney’s bankruptcy are set to take ownership of 160 locations as well as the retailer’s distribution centers in return for forgiving some of Penney’s $5 billion in debt. According to the Journal, the landlords will pay the lenders rent on those 160 stores and distribution centers.

Wells Fargo has agreed to give Penney $2 billion in revolving credit once the transaction is completed, leaving the retailer with $1 billion in cash. Penney will seek bankruptcy court approval for the deal early next month.

Penney filed for bankruptcy protection in May with nearly 850 locations at the time.

In late August, Penney’s lawyers indicated that discussions with potential acquirers of the company had hit a “stalemate” and the bankrupt retailer’s top lenders are considering making a “credit bid” to own the retailer as a stand-alone company that had increased the potential for possible liquidation.

Photo courtesy JCPenney