Mortgage stocks soared Tuesday after Fremont General ( FMT) sold its commercial loan business and hired hard-hitting new managers.

Fremont, which earlier this year consented to a cease-and-desist order from the Federal Deposit Insurance Corp. that forced it out of residential subprime lending, is selling its commercial real estate platform and a portion of its outstanding commercial loan portfolio to iStar Financial ( SFI).

The New York real estate investment trust, which specializes in commercial real estate financing, is paying $1.9 billion in cash.

In conjunction with the iStar deal, the Santa Monica, Calif.-based lender also said that an investor group led by Gerald J. Ford will take control of the company and the running of its retail bank. Ford used to run Golden State Bancorp before the West Coast thrift was sold back in 2004 to Citi ( C).

The investor group led by Ford is buying $80 million in preferred stock and warrants so that it can acquire additional common stock of the company. Carl Webb will become CEO, and Randy Staff will be finance chief.

Shares of Fremont surged $2.84, or 40%, to $9.95.

The stocks of smaller lenders that have been the hardest hit by troubles in the subprime and Alt-A markets also surged Tuesday.

Accredited Home Lenders ( LEND) rose 54 cents, or 4.1%, to $13.29. NovaStar Financial ( NFI) added 31 cents, or 5.2%, to $6.27, and American Home Mortgage ( AHM) tacked on 75 cents, or 3.6%, to $21.49.

"With the market being so bullish as it is, I think people are looking for any forms of optimism to give them a reason to buy a stock," says Matthew Shields, a trader at FIG Partners in Atlanta.

The stocks of mortgage lenders have "gotten beat up" because of the subprime fallout and are now trading cheaply, Shields says. "Anytime one of these deals are signed ... they all get bid up off this news."

Even shares of several larger lenders rose on the news. IndyMac's ( IMB) stock jumped $2.67, or 7.8%, to $35.44. Washington Mutual ( WM) gained 88 cents, or 2.1%, to $43.84.

Shares of Countrywide ( CFC), which had risen in early morning trading, fell back. The stock was down 5 cents to $40.44.

The news comes as many lenders, including Fremont, Accredited, NovaStar and American Home, reported souring credit quality in subprime and Alt-A loans and an increased demand for loan repurchases in the first quarter.

Many independent lenders make money selling loans to larger investment houses that securitize packaged loans and sell them to investors.

But demand has fallen for these securities, resulting in the bankruptcies of lenders such as New Century ( NEWCQ) and sales of various others.

Fremont has previously said that it is selling its residential real estate business to Ellington Capital Management.

iStar will retain a 30% stake in Fremont's $6.5 billion commercial loan portfolio. Fremont will retain a 70% stake in that pool. iStar also agreed to fund up to $4.4 billion worth of unfunded loan commitments associated with the portfolio.

While obtaining Fremont's commercial franchise will expand iStar's direct origination and construction platform, the REIT is also buying the portfolio interest on the cheap.

The company says $2.1 billion in loans is being acquired at 87% of principal value.

iStar was already familiar with Fremont's commercial lending business prior to the deal, said Jay Sugarman, iStar's chairman and CEO, on a conference call.

It had been co-lenders on a handful of loans and bought a small portfolio of loans last quarter from Fremont, he said.

Given Fremont's subprime troubles, "we decided to take a deeper look to see if there was an opportunity to add their commercial real estate platform to ours," Sugarman said.