Stocks declined, but sharply cut losses late on Tuesday that drove the Dow back above 10,000 as gains in the retail and materials sectors helped offset concerns about the euro zone's banking problems.

An S&P retail index <.RLX> rose 1.3 percent, while an S&P materials index <.GSPM> gained 1.2 percent.

The market's drastic paring of losses coincided with the euro's move above $1.23. Earlier in the day, the euro had dropped to almost a 4-year low versus the dollar..

The Dow Jones industrial average <.DJI> slipped 62.35 points, or 0.62 percent, to 10,004.22. The Standard & Poor's 500 Index <.SPX> dropped 3.35 points, or 0.31 percent, to 1,070.30. The Nasdaq Composite Index <.IXIC> fell 7.87 points, or 0.36 percent, to 2,205.68.

Earlier, the three major U.S. stock indexes had each fallen about 3 percent to session lows.

The S&P 500 briefly fell below February's intraday bottom of 1,044.50, reaching its lowest level since early November 2009.

European markets fell to their lowest level in nearly nine months as the Libor three-month dollar rate rose to the highest level since July. The Spanish government's rescue of a local bank over the weekend made banks leery of lending to European institutions. Rising Libor rates raise banks' funding costs.

The market's turnaround late in the day coincided with a shifting in volatility. The CBOE Volatility Index <.VIX> or VIX, known as Wall Street's fear gauge, fell 6.3 percent to 35.89 -- a sharp reversal from its earlier jump of 14.1 percent to a session high at 43.74.

Because volatility is 'mean reverting,' meaning that over time it comes back to the average, the futures are predicting that the inflated volatility will come in over time, said optionMonster analyst Chris McKhann. So they are showing that traders do expect this VIX to come down.

Fears of shrinking demand from a disrupted recovery also had hit commodities, with July crude futures falling 2.1 percent, or $1.46, to settle at $68.75 a barrel. Chevron Corp fell 1.7 percent to $72.21.

In a bright spot, U.S. consumer confidence rose for the third straight month in May to the highest in more than two years. But that was countered by a report showing single-family home prices dropping in the first quarter on renewed price pressure as federal aid faded away.

In earnings news, Medtronic Inc slid 2.1 percent to $39.78 despite reporting fourth-quarter earnings that beat expectations.

(Reporting by Chuck Mikolajczak; Additional reporting by Doris Frankel; Editing by Jan Paschal)