Ocwen Loan Servicing LLC, the mortgage-servicing arm of Ocwen Financial Corp. (NYSE: OCN), teamed with Walter Investment Mangement Corp. (NYSE: WAC) to win Residential Capital LLC’s assets with a $3 billion bid at a bankruptcy court auction.

The purchase is subject to bankruptcy court approval, and a sale hearing is scheduled for Nov. 19.

ResCap, a wholly owned subsidiary of Ally Financial Inc., is a mortgage servicing and origination company. As of March 31, the company was servicing more than 2.4 million loans with an aggregate unpaid balance of $374 million. Of those loans, about 68 percent are guaranteed by Fannie Mae, Freddie Mac of Ginnie Mae.

ResCap filed for Chapter 11 bankruptcy protection in the U.S. Bankruptcy Court for the Southern District of New York in Manhattan on May 14. The company says in court papers that a reduction in the ability to obtain financing, reduction in loan production and market volatility all contributed to its bankruptcy filing. It listed $3.5 billion in assets and $6.5 billion in liabilities on schedules filed with the court.

When the company sought bankruptcy protection, it proposed Nationstar Mortgage LLC act as the stalking-horse bidder for the mortgage loan origination and servicing business, and Ally Financial act as the stalking-horse bidder for the company’s portfolio of loans and other financial assets. ResCap expected those sales to bring in about $4 billion, according to court papers.

Ally Financial was owed about $1.1 billion from two prepetition loans when ResCap sought bankruptcy protection, court documents show.

ResCap suffered losses of $5.6 billion and $4.5 billion in 2008 and 2009, respectively, according to court papers. The company believed things would turn around in 2010, but the company faced several lawsuits in connection its selling of residential mortgage-backed securities.

On Feb. 9, Ally Financial, ResCap and other mortgage loan servicers reached an agreement in principle with the U.S. government, 49 state attorney generals and 48 state banking departments with regards to the U.S. Department of Justice’s investigation surrounding the mortgage crisis.

Jon Van Gorp and John Lawlor from Mayer Brown LLP served as deal counsel to Ocwen.