Stocks fell on Tuesday as an unexpected drop in consumer confidence cooled recent optimism about an economic recovery, but Wall Street still closed out its best quarter in a decade.

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 obstacle as their spending is a major driver of corporate profits and accounts for roughly two-thirds of U.S. economic activity.

Tuesday's standout decliners included industrials, energy, financials and material stocks, some of the very same sectors that helped underpin the market's push to recover from the 12-year lows 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> slipped 82.38 points, or 0.97 percent, to 8,447.00. The Standard & Poor's 500 Index <.SPX> dropped 7.91 points, or 0.85 percent, to 919.32. The Nasdaq Composite Index <.IXIC> shed 9.02 points, or 0.49 percent, to 1,835.04.

2ND QUARTER'S DOUBLE-DIGIT GAINS

Even so, the S&P 500 posted its best quarterly performance since the fourth quarter of 1998. The benchmark S&P 500 jumped 15.2 percent in the second quarter, while the blue-chip Dow average advanced 11 percent and the Nasdaq shot up 20.1 percent.

For the quarter, the Wilshire 5000 -- the broadest measure of publicly traded U.S. companies -- is up 16.21 percent or about $1.5 trillion.

For the month of June, the Dow shed 0.6 percent, while the S&P 500 inched up 0.02 percent, and the Nasdaq climbed 3.4 percent. Since its 12-year closing low on March 9, the S&P 500 is up 35.9 percent.

Among industrial stocks, shares of Caterpillar Inc , a maker of bulldozers and excavators, slumped 4.9 percent to $33.04, while on the technology front, International Business Machines Corp tumbled 1.3 percent to $104.42.

On Nasdaq, chip maker Qualcomm , off 1.9 percent at $45.20, was the worst drag.

OIL SECTOR HITS A SPEED BUMP

Sliding oil prices gave investors a reason to sell some

energy shares, with Exxon Mobil down almost 1 percent at $69.91.

Crude oil futures fell $1.60, or 2.2 percent, 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 dipped 0.4 percent to $23.20, while Tesoro declined 1.2 percent to $12.73.

On the final day of the second quarter, money managers set out to burnish their portfolios by selling losing stocks and scooping up winners in a move that helped the market end sharply off its lows.

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.

On the New York Stock Exchange, about 1.33 billion shares changed hands, below last year's estimated daily average of 1.49 billion, while on the Nasdaq, about 2.13 billion shares traded, below last year's daily average of 2.28 billion.

Declining stocks outnumbered advancing ones by a ratio of about 5 to 4 on both the NYSE and the Nasdaq.

(Editing by Jan Paschal)