Stocks held firm near recent five-month highs on Wednesday as investors awaited key bond market tests for Europe in the next two days that could determine the direction of the euro zone crisis.

Equities have been performing better in the face of turmoil from Europe's sovereign debt problems. This is a major change from four months ago and comes as investors have taken improving U.S. economic data to heart and an optimistic view about corporate earnings.

Wall Street recovered from early losses on Wednesday brought on by a warning from Fitch Ratings of severe repercussions, including a possible collapse of the euro, without more supportive action by the European Central Bank.

The Fitch news sent the euro to its lowest level in 16 months against the U.S. dollar, which would normally have spelled steeper losses for stocks.

The U.S. is being looked at clearly as the safe-haven trade, not only on the fixed income side but now even from equity investors, said Ken Polcari, managing director at ICAP Equities in New York.

We keep talking about the same stuff, but it's been that way for eight, nine months ... I hate to say it, but it's almost like people are immune to it now.

The benchmark S&P 500 index recovered to close little changed to continue the recent decoupling of U.S. stocks and the movement of the embattled euro.

The Dow Jones industrial average <.DJI> slipped 13.02 points, or 0.10 percent, to 12,449.45. The Standard & Poor's 500 Index <.SPX><.INX> gained 0.40 point, or 0.03 percent, to 1,292.48. The Nasdaq Composite Index <.IXIC> gained 8.26 points, or 0.31 percent, to 2,710.76.

Key bond auctions later this week from Italy and Spain, two countries at the center of the euro zone crisis, could hurt sentiment if they go poorly.

Materials shares moved higher, boosted by U.S. Steel Corp , up 4.7 percent to $28.56, after Credit Suisse upgraded fellow metals company AK Steel to an outperform rating. The S&P materials sector <.GSPM> gained 1 percent.

Further reflecting the weakening link between the euro zone and U.S. stock market, the 50-day correlation between the S&P 500 e-mini futures contract and the euro crossed the zero line this week after four months of being in positive territory, indicating they were no longer on the same path.

Supervalu Inc shares dropped 12.5 percent to $7.34 after quarterly sales at the third-largest U.S. supermarket chain missed estimates.

Clothing retailer Urban Outfitters Inc , grappling with inventory and declining margins, said its chief executive resigned unexpectedly, sending the company's shares tumbling 18.6 percent to $23.93.

On the Nasdaq, Crocs shares rose 16.4 percent to $18.56 after the shoemaker said it expects fourth-quarter revenue to be at the high end of its earlier estimate, becoming the latest footwear company to flag strong sales numbers for the holiday season.

Volume was modest with about 6.6 billion shares traded on the New York Stock Exchange, NYSE Amex and Nasdaq, almost even with the daily average of 6.7 billion.

Advancing stocks outnumbered declining ones on the NYSE by 1,646 to 1,352, while on the Nasdaq, advancers beat decliners 1,482 to 1,009.

(Reporting By Chuck Mikolajczak; Editing by Kenneth Barry)