The deal, which needs bankruptcy court approval, is the latest example of non-bank financial companies expanding in the mortgage business in the wake of the financial crisis. The sale will raise money for bankrupt ResCap, which is looking to repay creditors including its parent, auto lender Ally Financial Inc.

Ocwen and Walter teamed up to buy a mortgage servicing operation that handles payments for 2.4 million home loans with a balance of about $374 billion. ResCap, once a major subprime lender, also has a mortgage lending operation.

Under the bidding arrangement, the smaller Walter, based in Tampa, Florida, will get the right to administer $50 billion in loans owned by government-controlled mortgage finance company Fannie Mae. It also acquires ResCap's lending and capital markets businesses.

Atlanta-based Ocwen has been serially acquiring companies that collect payments on subprime mortgages, known as servicers, as banks and private equity firms look to shed them because of new regulations and capital requirements. The businesses can bring legal headaches, but can also bring profits as the housing market recovers.

Earlier this month, Ocwen agreed to buy mortgage lender Homeward Residential Holdings from Wilbur Ross' private equity firm for $750 million in cash and stock. At the end of June, Ocwen said it had a $127 billion servicing portfolio.

``They are capitalizing on the current weakness in the servicing market and the fact that banks are shunning it,'' said Guy Cecala, publisher of industry publication Inside Mortgage Finance. ``They can get good prices and there's not much competition.''

The auction had been Nationstar's to lose. The Lewisville, Texas-based mortgage servicer agreed to buy ResCap's mortgage business when it filed for bankruptcy in May, pending the outcome of the auction. It had set the opening bid at $2.45 billion.

``Obviously we are disappointed in the outcome of the auction, but in the end our judgment was that the price of the assets would not represent a compelling investment opportunity for us,'' Nationstar Chief Executive Jay Bray said in a statement.

Nationstar said it was now entitled to a breakup fee. A hearing on the auction will begin on Nov. 19.

BUFFETT BIG WINNER

One of the biggest winners in the auction is Berkshire Hathaway, which bid for the mortgage assets at one point even though most observers were certain Warren Buffett's conglomerate did not actually want them. It failed to unseat Nationstar as the opening bidder and did not participate in the auction that began Tuesday.

Berkshire held nearly $1 billion in ResCap junior secured debt as of this summer, and Nationstar's initial $2.4 billion bid was thought to be worth 93 cents on the dollar to bondholders like Berkshire.

A purchase price of $3 billion increases the likelihood that Buffett will make close to a full recovery on the debt - which perhaps was the whole point of his bid, some investors speculated.

Berkshire is the opening bidder for a loan package that ResCap is also selling. Its $1.44 billion topped ResCap's parent Ally, which had said it would buy the loans if no one else did. That auction begins on Thursday.

Stock prices for Ocwen and Nationstar have soared this year, as investors eye future growth. Ocwen shares are up 161 percent this year after climbing 4.3 percent on Wednesday. Nationstar's shares fell 9.6 percent on Wednesday, but are up about 122 percent since the company went public in March.

ResCap filed for bankruptcy in May in an effort to shed liabilities tied to soured loans sold to investors during the housing boom. Its parent Ally, which is majority owned by the U.S. government after a series of bailouts, is looking to focus on U.S. auto lending and banking after taking huge losses on ResCap's mortgages. It is also selling international businesses to help pay back taxpayers.