The US trade deficit shrank in June as imports slid to the lowest level since 2021, reflecting more moderate consumer demand for merchandise.

The shortfall in goods and services trade narrowed by $2.8 billion to a three-month low $65.5 billion, Commerce Department data showed Tuesday. The figures aren’t adjusted for inflation. The median estimate in a Bloomberg survey of economists called for a $65 billion deficit.

The value of total imports declined 1% to the lowest level since November 2021, reflecting decreases in the values of capital goods and industrial supplies. Exports eased 0.1%.

Imports have largely been decreasing since peaking early last year as shifts in consumer spending translate into lower demand for foreign-made products. Americans have steered more of their purchases toward services from goods, and some are also growing more discerning about their spending. 

That’s encouraged retailers to focus on bringing inventories more in line with sales.

On an inflation-adjusted basis, the merchandise trade deficit shrank to $86.2 billion in June.

The government’s initial growth estimate showed net exports subtracted from gross domestic product for the first time in more than a year in the second quarter.