(Reuters) - A judge on Tuesday approved Nationstar Mortgage Holdings Inc (>> National Semiconductor Corporation) as the opening bidder for Residential Capital LLC's mortgage origination and servicing business, beating out an offer from Warren Buffett's Berkshire Hathaway Inc (>> Berkshire Hathaway Inc.).

Berkshire will be the opening bidder for a ResCap loan portfolio, eclipsing an initial offer by ResCap's parent company, Ally Financial, a ResCap spokeswoman said after a U.S. Bankruptcy Court hearing in New York.

ResCap, the mortgage unit of Ally Financial , the former in-house financing arm of General Motors Co (>> General Motors Company), filed for bankruptcy last month with a plan to sell assets to Nationstar and Ally for about $4 billion.

After Berkshire emerged as a bidder for the mortgage business, Nationstar, a unit of Fortress Investment Group LLC (>> Fortress Investment Group LLC), increased its initial bid by $125 million to $2.45 billion, ResCap said. Berkshire bid $1.44 billion for the loan portfolio, $50 million more than Ally, ResCap said.

ResCap spokeswoman Susan Fitzpatrick said the company was encouraged that there was significant interest in the opening bidding for its assets. Other potential buyers will be able to bid as part of the Chapter 11 bankruptcy process.

ResCap filed for bankruptcy last month as it faced looming bond payments and a possible loss of financing from its parent. Ally is eager to shed mortgage liabilities that have left it limping in the wake of the financial crisis. The auto lender is 74 percent-owned by the U.S. Treasury after a series of government bailouts.

Ally spokeswoman Gina Proia said its initial "stalking horse" bid for Rescap's loan portfolio aimed to generate value for ResCap's bankruptcy estates as part of a settlement that gave Ally legal releases to claims over mortgage-backed securities.

"We are pleased to have fulfilled Ally's role regarding ResCap's legacy loan portfolio," Proia said.

Berkshire and Nationstar did not return calls seeking comment.

Judge Martin Glenn said on Monday he would appoint an independent examiner to investigate the bankruptcy of ResCap , a move sought by Berkshire.

Berkshire has said that some pre-bankruptcy financial transactions between ResCap and Ally were "potentially improper" in calling for the examiner appointment.

In a bankruptcy, an examiner investigates allegations such as dishonesty, fraud, incompetence and mismanagement. Judges have previously appointed examiners in bankruptcy cases for Lehman Brothers Holdings Inc and Dynegy Holdings, a unit Dynegy Inc (>> Dynegy Inc.).

Fitzpatrick, the ResCap spokeswoman, said the company hopes the examiner's work can be "completed promptly."

(Reporting By Rick Rothacker in Charlotte, North Carolina; Additional reporting by Ben Berkowitz in Boston and Caroline Humer in New York; Editing by Gary Hill and Leslie Gevirtz)

By Rick Rothacker