Consumers put away their wallets in June, sending retail sales crashing by the sharpest amount in nearly two years.

The Commerce Department reported Friday that retail sales fell by 0.9 percent last month, the biggest drop since August 2005. Demand for autos, furniture and building supplies all plunged.

The drop was much bigger than the flat reading that economists had been expecting. It raised new worries about consumer spending, which is closely watched because it accounts for two-thirds of total economic activity.

But in other economic news, the government reported that inventories held by businesses on shelves and backlots rose by 0.5 percent in May. This was a better-than-expected increase that provided support to the view that inventory rebuilding will help lift economic growth in coming months, offsetting the adverse effects of a sharp fall in housing activity.

The 0.5 percent rise in inventories in May surpassed the 0.3 percent increase analysts had been expecting and was the strongest performance in nine months.

Economists said the weaker-than-expected retail sales report called into question Thursday's big stock market surge, suggesting that investors were overly enthusiastic about an earlier report on sales by the nation's largest retail chains.

Wal-Mart Stores Inc., the world's largest retailer, posted better-than-expected results, which sent the stock market surging with the Dow Jones industrial average climbing by 283.86 points Thursday, its biggest one-day increase in more than four years.

Ian Shepherdson, chief U.S. economist at High Frequency Economics, said that he believed the growth in consumer spending will keep slowing in the months to come, in part because higher gasoline prices are crimping consumers' ability to spend in other areas.

Economists still believe that the economy is rebounding after a lackluster start to the year. They are predicting that overall growth, as measured by the gross domestic product, will come in at a rate of 3 percent or better in the just completed April-to-June quarter, a rebound that will be heavily influenced by a rebuilding in inventories after companies slashed inventory growth in the first three months of the year.

Economic growth, as measured by the gross domestic product, slowed to a dismal 0.7 percent rate in the first three months of the year, the weakest performance in more than four years.

But if the consumer falters, those optimistic forecasts of a rebound could be called into question. Analysts are worried that a relentless rise in gasoline prices and a slumping housing market could trigger a slowdown in spending.

In a new reading on consumer sentiment, the RBC Cash Index released Friday showed that confidence slid in early July to 76.1, the lowest reading since last August.

The 0.9 percent drop in June sales reflected a 2.9 percent fall in sales of autos and auto parts as Detroit continues to struggle with slumping demand for its sport utility vehicles in the face of rising gasoline prices.

In a sign of the weakness in the housing market, sales at furniture stores were down 3 percent last month, the biggest setback since February 2003, and sales at hardware stores fell by 2.3 percent.

Sales at specialty clothing stores fell by 1.4 percent while department stores saw sales fell by 1 percent. A broader category which includes such traditional department stores and big chains such as Wal-Mart posted an increase of 0.3 percent in June.

Sales at gasoline service stations dropped by 1.1 percent, a decline that was attributed to a temporary fall in gasoline prices during the month.

Excluding the big decline in auto sales, retail sales would still have been weak, falling by 0.4 percent, the poorest showing in this category since last September.