The news agency said Warren Buffett, Berkshire Hathaway Inc's (>> Berkshire Hathaway Inc.) controlling shareholder, appointed investment manager Ted Weschler for talks with Ally, quoting the persons who preferred anonymity.

Under the deal, Berkshire Hathaway would have taken on potential liabilities such as increasing litigation costs and other claims, while paying nothing upfront for ResCap's assets.

Buffett sought to avoid a ResCap bankruptcy filing because Berkshire had unsecured debt in the mortgage unit, the financial website said citing the persons.

Bloomberg's sources said Ally turned down Weschler's deal, and decided to file for bankruptcy instead, to avoid future liabilities.

"We are confident in the bankruptcy court-supervised bidding process, which is designed to ensure that the ResCap estate receives the best possible combination of price and terms for its assets in a court-approved transaction," ResCap spokesperson Susan Fitzpatrick told Reuters in an e-mail.

Residential Capital filed for bankruptcy protection in federal court in Manhattan last week.

At the same time, Nationstar Mortgage Holdings Inc (>> National Semiconductor Corporation), which is majority-owned by Fortress Investment Group LLC (>> Fortress Investment Group LLC), struck a deal to buy substantially all the mortgage-servicing and related assets from ResCap for about $2.4 billion, including debt.

Ally has been besieged in the past few years by losses at ResCap, once a major subprime lender and profit engine.

Ally could not immediately be reached for comment by Reuters outside regular U.S. business hours. Berkshire, based in Omaha, Nebraska, did not respond to a message seeking comment.

(Reporting by Balaji Sridharan in Bangalore; Editing by Eric Meijer)