Stocks slid on Tuesday as a surprising drop in a gauge of consumer confidence sparked caution about the economy's recovery prospects, hurting industrial, technology and energy shares.

The drop in the Conference Board's measure of consumer confidence in June suggested that the 18-month-long recession had yet to loosen its grip on the U.S. economy.

Gloom among consumers is a major setback since their spending accounts for about two-thirds of U.S. economic activity.

But even with Tuesday's market sell-off, the benchmark S&P 500 was on course to close its first positive quarter in almost two years, reflecting some of the optimism that led to the index's gain of 40 percent from the 12-year closing low of early March as investors bet on economic stabilization.

Consumer confidence is the excuse du jour for the latest market move, said Tom Alexander, head of Alexander Trading, in Savannah, Georgia.

For the market to go much higher, you are going to have to see some real hard evidence of some of these things that are being anticipated by the market start to come to fruition. Pick one. Are the bank balance sheets really cleaned up? Nobody knows. The market has gone up on a lot of faith here.

The Dow Jones industrial average <.DJI> shed 100.82 points, or 1.18 percent, to 8,428.56. The Standard & Poor's 500 Index <.SPX> lost 9.60 points, or 1.04 percent, to 917.63. The Nasdaq Composite Index <.IXIC> slipped 11.44 points, or 0.62 percent, to 1,832.62.

Since its 12-year closing low on March 9, the S&P 500 is up 35.6 percent.

Among industrial stocks, shares of Caterpillar Inc , a maker of bulldozers and excavators, slumped 4.7 percent to $33.12, while on the technology front, International Business Machines Corp tumbled 1.4 percent to $104.34.

On Nasdaq, chip maker Qualcomm , off 1.8 percent at $45.25. was the worst drag.

Sliding oil prices gave investors a reason to sell some energy shares, with Exxon Mobil down 1.3 percent at $69.69.

The S&P energy index <.GSPE> fell 0.9 percent as risk aversion resurfaced after the confidence data and helped lift the U.S. dollar <.DXY>. As a result, commodity prices fell.

Crude oil futures fell 2.2 percent or $1.60 to settle at $69.89 a barrel.

Shares of U.S. oil refiners such as Sunoco Inc and Tesoro Corp dropped after Goldman Sachs cut them to sell from neutral.

Sunoco was off 1.5 percent at $22.95, while Tesoro declined 1.9 percent to $12.63.

On the final day of the second quarter, money managers were likely to burnish their portfolios by selling losing stocks and scooping up winners in a move that typically fuels volatility.

And volume was on the lighter side due to a holiday- shortened week. U.S. markets will be shut for the U.S. Independence Day holiday on Friday.

Tuesday's other economic news were separate reports that showed U.S. single-family home prices fell in April but the pace of decline moderated, and business activity in the Midwest contracted again in June, but at a less severe rate than expected.

(Editing by Jan Paschal)