U.S. wholesale inventories increased in June, adding to economic growth in the second quarter.

The Commerce Department's Census Bureau said on Thursday that wholesale inventories rose 0.2% in June as previously estimated. Stocks at wholesalers advanced by 0.5% in May.

Economists polled by Reuters had expected that inventories, a key part of gross domestic product, would rise by an unrevised 0.2%. Inventories edged up 0.1% on a year-on-year basis in June.

The economy grew at a 2.8% pace in the second quarter. That was double the growth pace in the first quarter. Private inventory investment added 0.82 percentage point to GDP growth in the April-June period after being a drag for the two previous quarters, which more than offset a 0.72 percentage point hit from a wider trade gap.

Wholesale motor vehicle inventories rose 0.8% in June. Excluding autos, wholesale inventories advanced 0.1%. This component goes into the calculation of GDP.

Sales at wholesalers fell 0.6% in June after rising 0.3% in May. At June's sales pace it would take wholesalers 1.37 months to clear shelves, up from 1.35 months in May.

(Reporting by Lindsay Dunsmuir; Editing by Paul Simao and Andrea Ricci)