Walter Investment Management agreed to acquire all of Residential Capital's Fannie Mae mortgage servicing rights, and related advances for $540 million according to a filing with the Securities & Exchange Commission.

Ocwen Financial put up the rest of the total $3 billion winning bid.

The joint bid beat out Nationstar Mortgage Holdings. Walter and Ocwen were determined at an auction sponsored by the US Bankruptcy Court to have submitted the highest and best bid to acquire the mortgage servicing and origination and capital markets platforms of ResCap, according to the SEC filing.

The assets to be acquired include approximately $50.4 billion of Fannie Mae MSRs, $183 million of related advances, and the ResCap originations and capital markets platforms.