Analysts said a slackening in demand would now lead businesses to try to curb the inventory buildup, which could significantly weigh on economic growth.
The recovery already has started cooling down, a bit earlier than analysts had anticipated.
We have seen an improvement in demand, but it's not so strong to justify continued large increases in inventories. If sales are slowing then inventories don't need to rise in order to keep up with demand, said Kim Whelan, an analyst at Wells Fargo Securities in Charlotte, North Carolina.
Wholesale sales fell 0.3 percent in May after rising 0.9 percent in April, the Commerce Department said. It was the first drop in sales since March 2009.
In the 12 months to May, sales were up 15.1 percent. Analysts polled by Reuters had expected sales at wholesalers to rise 0.5 percent in May from April.
With sales declining, wholesale inventories rose 0.5 percent, building on April's 0.2 percent gain.
Compared to May last year, inventories fell 2.1 percent.
INVENTORIES SUPPORTING RECOVERY
Inventory rebuilding from record low levels has been one of the key drivers of the economy's recovery from the worst recession since the 1930s. Business inventories contributed 1.9 percentage points to growth in the first quarter.
Inventories have now fully recovered from the record liquidation rate in the second quarter of last year, and we will likely see less of an inventory boost to GDP in the second half of the year, said Mike Englund, chief economist at Action Economics in Boulder, Colorado.
This may prove problematic for the economy.
After accelerating in the first quarter, consumer spending has turned sluggish as households struggle with a 9.5 percent unemployment rate and tepid income growth. Consumer spending normally accounts for 70 percent of U.S. economic activity.
In May, wholesale sales were pulled down by a 1 percent drop in purchases of nondurable goods. This was the largest decline since March of last year.
The weak sales pace lifted the inventory-to-sales ratio, a measure of how long it would take to sell stocks at the current sales pace, to 1.14 months' worth from April's 1.13 months.
While some analysts believe business will want to get ahead of the curve and restrain any unwanted inventories buildup, others said the inventory-to-sales ratio, which has steadily declined from a peak above 1.40 months' worth at the beginning of 2009, remained at comfortable levels.
This remains close to an all-time low, which suggests that firms are likely to continue to rebuild stock levels in the coming months, said Peter Newland, an economist at Barclays Capital in New York.
Data next Wednesday will probably show that business inventories rose 0.4 percent in May, following a similar gain in April, according to a Reuters survey.
(Editing by Andrea Ricci)