Investors abandoned red-hot commodity shares on Tuesday, while fears of lower supermarket profits hit food retailers, sending the S&P and Nasdaq lower.

Volume was strong for a second day as investors reshuffled their portfolios at the beginning of the year, and analysts said the attractiveness of equities was intact.

Recent stock gainers topped Tuesday's list of losers, falling as copper, oil and other commodities slipped from multiyear highs.

The S&P materials index <.GSPM> fell 0.5 percent and the energy index <.GSPE> lost 0.6 percent. Materials and energy were among the top-performing sectors in 2010.

The S&P is pretty buoyant because of the fact that there seems to be a little bit of a renewed interest in the market, said Nick Kalivas, senior equity index analyst at MF Global in Chicago.

I think it's subtle, but I do think it's present. How long it lasts is obviously the million dollar question.

Shares of grocer Supervalu Inc fell more than 6 percent and was the top percentage decliner on the S&P 500 after Morgan Stanley told investors to cut holdings in the stock, saying rising food costs will crimp margins. Safeway Inc and Whole Foods Market also slid.

The Dow Jones industrial average <.DJI> added 20.43 points, or 0.18 percent, to 11,691.18. The Standard & Poor's 500 Index <.SPX> dipped 1.67 points, or 0.13 percent, to 1,270.20. The Nasdaq Composite Index <.IXIC> was off 10.27 points, or 0.38 percent, to 2,681.25.

The S&P and Nasdaq pared losses modestly and the Dow edged higher following minutes from the Federal Reserve's December policy meeting that showed officials felt the U.S. economic recovery was still weak enough to warrant monetary support in the form of bond purchases by the Fed.

The market was also supported by strength in defensive shares, including the utilities and telecom sectors. The defensive tone aided blue chips as the Dow ended higher.

The market's weakness followed a strong start to the new trading year on Monday. The Dow and S&P 500 recently hit two-year highs as data pointed to a U.S. recovery.

While many analysts see another year of gains for the S&P 500, Morgan Stanley offered a contrarian view, forecasting the S&P 500 would end the year lower.

Shares of Supervalu dropped 6.3 percent to $9.00. Safeway was down 3.8 percent at $21.64, and Whole Foods fell 3.4 percent to $49.04.

About 8.38 billion shares traded on the New York Stock Exchange, the American Stock Exchange and Nasdaq, just below last year's estimated daily average of 8.47 billion.

Declining stocks outnumbered advancing ones on the NYSE by 1,889 to 1,103, while on the Nasdaq, decliners beat advancers 1,805 to 844.

(Reporting by Leah Schnurr; Editing by Kenneth Barry)