The U.S. mortgage meltdown has crushed dozens of lenders and is causing severe liquidity problems at the largest, Countrywide Financial Corp.

The credit crunch may also spawn some winners: the biggest U.S. banks.

Wells Fargo & Co., Citigroup Inc , JPMorgan Chase & Co, Bank of America Corp and Washington Mutual Inc -- the next five biggest mortgage lenders -- as well as No. 8 Wachovia Corp are likely to add market share as weaker rivals fall away, analysts said.

The reasons: Large bases of funding, and well-diversified operations in areas that include retail and commercial banking, credit cards, investment banking and wealth management.

By contrast, Countrywide generates more than half of its revenue from mortgage banking.

The mortgage industry is undergoing a violent shakeout, said Mark Batty, an analyst at PNC Wealth Management in Philadelphia, which invests $77 billion. Thrifts or banks with funding from core deposits should be able to get through this cycle. Companies likely to be shaken out are monoline mortgage companies that rely on capital markets for funding.

Shares of the biggest banks all rose on Thursday, even as Countrywide shares tumbled.

The No. 7 lender is ResCap, part of privately-controlled GMAC LLC, which lacks the deep funding sources of a big bank. Moody's Investors Service and Fitch Ratings on Thursday downgraded ResCap to junk status. Automaker General Motors Corp owns 49 percent of GMAC.

MORE RELIABLE LOANS, AND LOAN SOURCES

Many mortgage lenders have struggled amid soaring defaults and borrowing costs, stagnant home prices and tight capital markets. Dozens of lenders have quit the industry, and several have gone bankrupt.

Seattle-based Washington Mutual, whose home loan unit lost $150 million from January to June, said it is well-prepared.

We're well diversified, and have reliable sources of funding, including retail and wholesale deposits, and home loan bank borrowings, and don't rely on commercial paper as a source of funding, Treasurer Robert Williams said in an interview.

Countrywide is reducing its reliance on capital markets. On Thursday it said it plans to originate nearly all home loans in its banking unit, which ended June with $60.6 billion of deposits.

That change comes as the Calabasas, California-based lender taps an entire $11.5 billion credit line after savage capital markets conditions left it unable to borrow at normal terms.

Like many lenders, Countrywide also promised to boost its emphasis on higher quality loans, largely those qualifying for purchase and guarantee by government-sponsored enterprises (GSEs) Fannie Mae and Freddie Mac, the mortgage financiers. These top out at $417,000 each.

The winners are Wells Fargo, Washington Mutual -- and the big winners of this entire crisis are Fannie Mae and Freddie Mac because the entire market is shifting toward GSE-eligible securities, said Lee Norton, a financial services analyst at JS Asset Management in West Conshohocken, Pennsylvania.

MIGRATION

Many exotic loans have largely disappeared for now, such as those allowing flexible payments, or piggyback loans that let people essentially pay nothing down to buy homes.

Many smaller lenders were doing non-conforming loans, said Christopher Wolfe, a managing director at Fitch Ratings. That market has been virtually shut down. If it comes back, it will migrate to bigger players that are more diversified and can offset cyclical weakness.

Before Countrywide's liquidity issues arose, Chief Executive Angelo Mozilo, who made $122 million last year from compensation and stock or option awards, had predicted the company he co-founded in 1969 would survive any industry shakeout.

PNC's Batty is less certain.

You're going to see something on the lines of the Wells Fargos, JPMorgans, Bank of Americas and Citigroups dominating, he said. Who knows what's going to happen with Countrywide. It might wind up in the hands of a larger player.

Countrywide did not return several requests for comment on Thursday.

(Additional reporting by Joseph Giannone and Dan Wilchins)