Stocks jumped on Thursday after Wells Fargo said it expects to report a record quarterly profit, providing a ray of hope for the struggling financial sector and adding fuel to the month-long rally.

Wells Fargo shares jumped more than 24 percent to $18.57 after the bank said it expects to post $3 billion in net income for the first quarter, topping analysts' expectations.

This is another step in that they are about to report earnings that are not a disaster and are creeping into the black, said Bruce Zaro, chief technical strategist at Delta Global Advisors in Boston.

It's another piece of gathering evidence that banks can very likely weather and probably pass the worst operating results that they've seen.

In addition, a source familiar with talks told Reuters U.S. officials will not look to close any banks based on the results of stress tests being conducted to determine how the largest U.S. banks would fare under more adverse economic conditions.

The Dow Jones industrial average <.DJI> gained 219.90 points, or 2.81 percent, to 8,057.01. The Standard & Poor's 500 Index rose 26.26 points, or 3.18 percent, to 851.42. The Nasdaq Composite Index <.IXIC> jumped 55.77 points, or 3.51 percent, to 1,646.43.

The state of the banks has been a key factor behind the stock market's sentiment and are at the heart of the global economic crisis. The current rally first took off in early March when several major banks said they had made money in the first two months of the year.

Shares of JP Morgan Chase rose 11.7 percent to $30.65, making it the Dow's top performer. The KBW Bank index <.BKX>jumped more than 14 percent, putting the index on track for its longest weekly winning streak since the fall of 2006.

However, analysts cautioned that the news from Wells Fargo was not an all clear signal for the sector.

It is still going to remain a bank-to-bank issue, said Fred Dickson, market strategist and director of retail research at D.A. Davidson & Co in Lake Oswego, Oregon.

I don't think one can generalize and make a blanket statement that all the bank results are going to be slightly better than what is currently expected.

Berkshire Hathaway gained after the profit projection from Wells Fargo, one of the bank's largest investments. The gains came the day after Berkshire lost its triple-A credit rating. Berkshire's Class A shares were up 3.1 percent to $ 91,675.

But on the downside, Wal-Mart Stores Inc was the Dow's biggest weight, down 3 percent at $50.03 after the company reported a lower-than-expected 1.4 percent increase in March sales at U.S. stores open at least a year. But the discount retailer also forecast quarterly earnings at the high end of its previous view.

Apple Inc led the Nasdaq higher, rising 2.9 percent to $119.74 after Credit Suisse lifted its price target on the stock to $133 from $120.

The S&P 500 was on pace for its fifth consecutive weekly advance and is up more than 25 percent since the 12-year closing low reached on March 9.

(Additional reporting by Edward Krudy)

(Editing by Theodore d'Afflisio)