The U.S. trade deficit in goods narrowed in June as exports rebounded, but trade likely remained a drag on economic growth in the second quarter.

The goods trade gap contracted 2.5% to $96.8 billion, the Commerce Department's Census Bureau said on Wednesday. The deficit widened in the prior two months.

The government is scheduled to publish its advance estimate of second-quarter GDP growth on Thursday. Gross domestic product likely increased at a 2.0% annualized rate last quarter, according to Reuters survey of economists.

Trade subtracted from GDP in the first quarter, with the economy growing at 1.4% pace during that period.

(Reporting By Lucia Mutikani; Editing by Andrew Heavens)