The financial downturn has not been kind to mortgage lenders who specialized in loans to high-risk borrowers. Many landed in bankruptcy and have been forced to engineer quick sales of their assets. But ResCap, a unit of auto lender Ally Financial , has had a comparatively smooth march through bankruptcy since filing in May.

Instead of being forced to hold a fire sale, ResCap has lined up high-profile bidders, including Fortress Investment Group's Nationstar Holdings (>> Nationstar Mortgage Holdings Inc) and Warren Buffett's Berkshire Hathaway Inc (>> Berkshire Hathaway Inc.), for an October 23 auction that could raise the money it needs to repay creditors. The key asset on the block is ResCap's mortgage loan servicing and loan origination business.

The sale is expected to raise at least $4 billion, which will then become part of a pool of money used to pay back Ally and other investors, including those who bought mortgage-backed securities tied to ResCap home loans that went bad.

The business is seen as attractive as the housing market has slowly started to recover, and few similar businesses are up for sale. Another plus for buyers is the opportunity to buy the business without its accompanying liabilities, thanks to bankruptcy laws that leave those liabilities behind in a trust.

"We've been fortunate in that the market is stabilizing and that the private sector views the mortgage origination and servicing business as an attractive business," ResCap Chief Executive Tom Marano said in an interview.

"A few years ago we could barely get anybody to show up," he said, referring to the company's previous efforts to sell ResCap. It had also previously considered putting it into bankruptcy.

The ultimate decision to file for Chapter 11 came as Ally, the former in-house financing arm for General Motors Co (>> General Motors Company), sought to sever itself from billions of dollars of ResCap's mortgage liabilities. ResCap's mortgages are sold under the name GMAC, for General Motors Acceptance Corp.

The New York-based mortgage lender stayed in business through the housing crisis because it was part of Ally, which was previously known as GMAC Financial Services and offered auto loans and home and commercial mortgages. When Ally received $17 billion in government bailout money, billions went to shoring up mortgage losses. Other subprime lenders, in contrast, did not have financial backing to carry them through the sharp downturn.

New Century Financial Corp, for instance, filed for bankruptcy in April 2007, let go 3,200 employees, and stopped issuing new loans. The next month, it shut down its lending operation, laid off another 2,000 people, and sold its remaining servicing business for $188 million.

American Home Mortgage Investment Corp, once one of the top 10 U.S. mortgage providers, could not meet lender margin calls and went bankrupt in August 2007. It sold its servicing business for about $500 million and then liquidated.

ResCap has kept up new loan activity while in bankruptcy, said Marano, a former Cerberus Capital Management and Bear Stearns & Co executive. In addition to securing financing for the bankruptcy, the company reached out to customers to make sure they knew it was still operating normally.

He also said the lender has done 17,600 refinancings and thousands of home loan modifications since the bankruptcy.

Holding off on bankruptcy limited job losses - ResCap still has 3,800 employees compared to 4,500 at the end of 2008. But it's less clear if waiting was good for its investors. While the expected proceeds from the sale are higher than they would have been during the financial crisis, it has more debt to pay back.

"Is that gain in the value of ResCap washed out by the amount Ally had to pump into it in the interim? I'm not sure we have hard numbers on either front," said Stephen Lubben, a law professor at Seton Hall University and an expert in bankruptcy.

KEEPING UP NUMBERS

ResCap has 2.3 million mortgage holders, Marano said, almost as many as it had in May. Its July monthly operating report, released in August, shows servicing revenues are stable. Marano said ResCap also has hired 350 more people for its servicing and origination business. Servicers handle mortgage paperwork, collect payments, pay taxes and manage foreclosures.

If ResCap hadn't kept its business going, it could have hurt the fragile mortgage industry. Other servicers may have had to scramble to absorb its millions of mortgages, and its servicing business would have shrunk if it had stopped extending loans.

With that in mind, the company's law firm, Morrison & Foerster, and banker, Centerview Partners, spent months before the bankruptcy working on approvals from the entities that buy mortgages - Fannie Mae, Freddie Mac and Ginnie Mae - for the sale of mortgage origination and servicing to Nationstar. A competing buyer will need similar approvals, but the agencies said in court they were ready to work with other bidders too.

So far, the sale has attracted wide interest. Nationstar is the starting bidder. Its $2.45 billion initial offer beat out Berkshire Hathaway, which emerged as a bidder in June. In addition, mortgage servicer Ocwen Financial (>> Ocwen Financial Corporation), expects to bid, Ocwen Chief Financial Officer John Britti told Reuters.

Another servicer, Walter Investment Corp, and a few private equity firms are also likely to take part in the auction, according to sources familiar with the situation. Walter Investment did not respond to request for comment.

ResCap declined to comment on who is bidding. Marano said bidders are examining the financials and that ResCap expects about half a dozen offers for the loan servicing and origination business. He also anticipates a similar number of bidders for a group of distressed loans up for sale at the auction.

Berkshire has set the low bid for the loan package at $1.44 billion, topping Ally, which had said it would buy the loans if no one else would. The asset sales could close by year end, leaving behind about $1 billion to $2 billion of other assets expected to be sold later.

The most contentious part of the bankruptcy may come after the sale, which will essentially leave behind a pile of cash for creditors. Those creditors, including bondholders, mortgage-backed securities investors and perhaps even homeowners, will have a role in deciding repayments.

And as when new GM emerged from bankruptcy in 2009 and old GM stayed behind to haggle over creditor claims, old ResCap is likely to continue to face liabilities in court related to the housing crisis.

Last week, the U.S. Securities and Exchange Commission disclosed it was investigating ResCap for possible wrongdoing in its loan origination and underwriting practices.

Also, a court-appointed examiner is looking at the bankruptcy and a report is expected in January. But that report is not likely to impede the sale of the business.

"We're on a very good trajectory with all the potential bidders for that October date," Marano said.

(Reporting By Caroline Humer and Rick Rothacker; Additional reporting by Paritosh Bansal; Editing by Martha Graybow, Bernard Orr)

By Caroline Humer