The stock market posted its best day this year, with Tuesday's late spark coming from JPMorgan Chase & Co after the bank announced it will raise its dividend.

Stocks gained throughout the session, helped by stronger-than-expected retail sales and benign comments from the Federal Reserve, which said recent strains on financial markets were easing.

The S&P 500 closed at a level not seen since June 2008 in a sign that the market foresees more strength in the U.S. economy in coming months. The index, already up 11 percent this year, has risen for five straight days and appears set for more gains.

Banks led the way with a powerful kick into the close. JP Morgan Chase & Co surged 7 percent to $43.39 and was the Dow's top gainer after announcing it will raise its dividend and unveiling a $15 billion stock-buyback program. Bank of America Corp gained 6.3 percent to $8.49 while an S&P index of financial stocks <.GSPF> climbed 3.9 percent.

That kind of put us into fourth gear here, said Larry Peruzzi, senior equity trader at Cabrera Capital Markets Inc in Boston. The financials have been such a drag on the whole market for the last couple of years.

The Nasdaq Composite hit an intraday high at 3,039.89, its highest mark since November 2000.

Tuesday marked the first time that the Nasdaq closed above 3,000 and the Dow ended above 13,000 on the same day.

The S&P 500's move above 1,390 puts the broad-market index in position to surpass 1,400, which could bring out more buyers. The S&P 500 index reached 1,396.13, its highest intraday level since June 2008.

The momentum we're seeing is likely to continue, said David Joy, chief market strategist at Ameriprise Financial in Boston.

Joy, who helps oversee $571 billion in assets under management, added that despite the gains, he didn't see stocks as overpriced.

You need to be overweight stocks right now, he said. In the absence of bad news, I see no need for us to have any kind of serious correction.

Underscoring the upbeat sentiment, the CBOE Volatility Index or VIX, <.VIX> hovered near levels not seen since mid-2007. Its 14-day moving average is at its lowest since last June.

The Dow Jones industrial average <.DJI> shot up 217.97 points, or 1.68 percent, to 13,177.68 at the close. The Standard & Poor's 500 Index <.SPX> rose 24.87 points, or 1.81 percent, to 1,395.96. The Nasdaq Composite Index <.IXIC> climbed 56.22 points, or 1.88 percent, to 3,039.88.

The Fed said the economy was expanding moderately, though growth still faced significant downside risks. The assessment of the economy's expansion was unchanged from the Fed's January statement.

Data in the United States once again indicated a slowly improving domestic economy, as retail sales recorded their largest gain in five months in February despite rising gasoline prices.

The PHLX housing sector index <.HGX> hit its highest level since May 2010, and a banking sector index <.BKX> was at a seven-month high.

Euro-zone finance ministers gave final approval to a second bailout for Greece, and a German index of analysts' and investors' sentiment rose much more than expected in March.

The European Union, the United States and Japan formally asked the World Trade Organization to settle a dispute with China over restrictions on exports of raw materials, including rare earth elements critical to electronics makers.

Beijing said the export curbs were motivated by environmental concerns, adding that it would defend itself.

Shares of Molycorp , a rare earth oxide producer that owns a rare earth project outside of China, shot up 3.2 percent to $30.82. The company's stock has seen daily moves of at least 4 percent more than a dozen times this year.

Despite the upbeat retail data, shares of Urban Outfitters Inc dropped 5.3 percent to $27.95 a day after it said it expects margins to continue to be pressured. The stock was the S&P 500's biggest decliner.

Almost four-fifths of the companies traded on the New York Stock Exchange closed higher while on the Nasdaq, three of every four stocks closed in positive territory.

Volume was light, with about 7.38 billion shares traded on the New York Stock Exchange, the American Stock Exchange and Nasdaq, below last year's daily average of 7.84 billion.

(Corrects paragraph 1 to JPMorgan will raise dividend)

(Editing by Jan Paschal)