The US trade deficit fell by 22.4% to $34.2bn (£22.3bn) in June, the smallest gap since October 2009.
The percentage contraction was also the largest since February 2009.
The three-month average of the trade deficit, which irons out monthly volatility, also fell to $39.5bn in the three months to June from $40.5bn in the previous period.
Meanwhile, May’s trade shortfall was revised to $44.1bn from the previously reported $45.0bn.
The smaller June deficit could lead the government to revise economic growth for the April-to-June quarter up from its initial estimated annual rate of 1.7%.