Stocks rallied on Monday as investors snapped up beaten-down shares of financial companies after a sharp drop at the end of last week on mounting concerns about the stability of the credit markets.

The Dow erased Friday's losses, and had its biggest daily percentage advance since June 2003, while the Standard & Poor's 500 index turned in its best one-day performance since April 2003.

Stocks also got a boost from speculation the Federal Reserve may take steps to reassure investors that troubles in the subprime mortgage market won't slow economic growth.

Wells Fargo & Co. announced the buyback of another 50 million shares, while Merrill Lynch's stock was upgraded by UBS AG, which said the stock's price already reflects risks the company faces in the mortgage market.

Shares of Bear Stearns Cos. rose 5 percent after a Standard & Poor's analyst said the market's response to the ratings agency's recent outlook change to negative was a vast overreaction.

People feel like there's some confidence being restored in the debt markets, said Stephen Massocca, co-chief executive of San Francisco-based investment bank Pacific Growth Equities, noting Wells Fargo's buyback and other financial sector news.

The rubber band was pretty stretched on the way down. A lot of things were very oversold, he said.

The Dow Jones industrial average jumped 286.87 points, or 2.18 percent, to end at 13,468.78. The Standard & Poor's 500 Index climbed 34.61 points, or 2.42 percent, to 1,467.67. The Nasdaq Composite Index advanced 36.08 points, or 1.44 percent, to 2,547.33.

Only one of the 30 Dow industrials ended the session lower. Alcoa Inc. fell 1.4 percent to $35.67.

Volume was high, with about 2.29 billion shares changing hands on the New York Stock Exchange, above last year's daily average of 1.84 billion. On the Nasdaq, about 2.84 billion shares were traded, above last year's daily average of 2.02 billion.

On Tuesday, the Federal Open Market Committee is expected to leave interest rates unchanged at its meeting, but investors will pay special attention to the accompanying statement expected around 2:15 p.m.

FANNIE MAE AND WELLS FARGO CLIMB

Shares of home funding companies Fannie Mae and Freddie Mac rose on speculation that regulatory restrictions limiting the size of their portfolios might be lifted. Shares of Fannie Mae shot up 10.4 percent to $62.50, while Freddie Mac's stock jumped 7.7 percent to $60.

Shares of Bear Stearns gained $5.46, or 5 percent, to $113.81, while shares of Wells Fargo rose 5.9 percent, or $1.95, to $34.76, and shares of Merrill advanced 6.4 percent, or $4.50, to $74.55 -- all in NYSE trading.

At Friday's close, the S&P index of financial shares was down 12.7 percent for the year to date. On Monday, the index gained 4.7 percent.

Bear Stearns' stock was down in early trading, and investors were jittery after Friday's losses -- the worst for any single day since February 27 -- on escalating fears of a credit squeeze. A top executive at Bear Stearns said Friday that conditions in the credit market were the worst he'd seen in his 22 years in the business.

Shares of NovaStar Financial Inc. rose 5.9 percent to $6.78 on the NYSE after it said it would resume funding wholesale mortgages on Tuesday; it had temporarily suspended issuing commitments for some of these loans.

American International Group , the world's largest insurer, led the Dow's advancers, with a gain of 4.7 percent to $64.56 on the NYSE. AIG is set to report quarterly earnings on Wednesday. Shares of Citigroup Inc., the largest U.S. bank, gained 5.8 percent to $48.35 and contributed the most to the S&P 500's gain.

OIL TANKS, APPLE RISES

A drop of 4.5 percent in the price of oil depressed some energy companies' stocks, but relieved investors' worries about the effect of higher gasoline prices on consumer spending. U.S. crude for September delivery fell $3.42 to settle at $72.06 a barrel.

On the Nasdaq, shares of iPod maker Apple Inc. rose 2.6 percent to $135.25 ahead of an announcement expected this week on new iMac computers.

Shares of consumer products companies that would better withstand an economic slowdown led the Dow's advance early in the day. Procter & Gamble ended up 3.4 percent at $65, while diversified health-care company Johnson & Johnson, also considered a defensive stock, gained 2.9 percent to $62.30.

Advancers outnumbered decliners on the NYSE by a ratio of 6 to 5. On the Nasdaq, the trend was the opposite -- with eight stocks down for every seven that rose.