By Lucia Mutikani

WASHINGTON (Reuters) - U.S. wholesale inventories barely rose in May as automobile stocks recorded their biggest drop in more than 2-1/2 years, suggesting inventory investment likely remained a drag on economic growth in the second quarter. The Commerce Department said on Tuesday that wholesale inventories edged up 0.1 percent after increasing 0.7 percent in April. Economists had forecast wholesale inventories rising 0.2 percent in May. Inventories are a key component of gross domestic productchanges. The component of wholesale inventories that goes intothe calculation of GDP - wholesale stocks excluding autos - increased 0.4 percent in May.

Higher prices for commodities, including petroleum, largely accounted for the gain in ex-autos wholesale inventories in May. As such, this will probably not provide a boost to second-quarter GDP growth, when adjusted for inflation.

Following the data, the Atlanta Federal Reserve trimmed its second-quarter GDP growth estimate by one-tenth of a percentage point to a 2.3 percent annualized rate.

"What has been reported suggests there was a sharp slowing in the pace of inventory accumulation between the first quarter and second quarter," said Daniel Silver, an economist at JPMorgan in New York.

According to Silver, data so far suggested that the inflation-adjusted change in inventories in the second quarter was between a $20 billion and $25 billion rate. That implied inventories subtracted about one percentage point from GDP growth in the second quarter, he said.

A report last week showed factory inventories slipped in May. Retail inventory data for May will be published on Friday. Inventory investment cut just over two-tenths of a percentage point from GDP growth in the first quarter, helping to hold back the rise in output to a 1.1 percent annualized rate.

Businesses accumulated record inventory in thefirst half of 2015, which outstripped demand. Inventories have weighed on GDP growth since the third quarter of that year as businesses tried to unload the piles of unwanted merchandise.

Still, inventories remained high in the second half of 2015 and the first quarter of 2016.

"If our second-quarter estimate of the inventory data is correct, the inventory correction should be over by the start of the third quarter, making inventories much more favorable for growth beginning in the third quarter," said Silver.

In May, auto inventories fell 1.9 percent, the biggest decline since September 2013. Wholesale stocks of petroleum increased 3.2 percent and farm products inventories soared 5.9 percent.

Sales at wholesalers increased 0.5 percent in May, adding to the prior month's 0.8 percent gain. With sales rising for a third straight month, it would take wholesalers 1.35 months to clear shelves, down from 1.36 months in April.

(Reporting by Lucia Mutikani; editing by Andrea Ricci)