(Bloomberg) -- The US merchandise-trade deficit narrowed in August to the smallest since October 2021 as both imports and exports dropped, suggesting a tailwind for economic growth in the third quarter.

The shortfall shrank 3.2% to $87.3 billion last month, Commerce Department data showed Wednesday. The figures, which aren’t adjusted for inflation, compared with a median estimate for a gap of $89 billion in a Bloomberg survey of economists.

Exports declined 0.9% to $179.8 billion, the first drop since January. Imports retreated for the fifth straight month to $267.1 billion.

Inbound shipments of consumer goods advanced 4.5% to $283.2 billion. While imports of consumer merchandise have fallen from a record earlier this year, they remain well higher than the pre-pandemic average.

The dollar strengthened for a third straight month in August, lowering the cost of imports and making exports more expensive. The US currency has since gained even more as the Federal Reserve presses on with significant interest-rate hikes, signaling further difficulty to exporters ahead.

“Looking ahead, exports will see the effects of both slowing foreign demand and a stronger dollar while imports will be impacted by weakening domestic demand, as global economies feel the effects of central bank tightening,” Rubeela Farooqi, chief US economist at High Frequency Economics, said in a note.

Ports had for months been overwhelmed by an influx of goods that triggered supply-chain logjams and delivery delays, but that is showing signs of abating due to logistics improvements and as interest-rate increases start to weigh on demand.

Retail inventories increased 1.4% in August to a fresh record of nearly $741 billion from a month earlier as companies stock up on merchandise amid still-uncertain supply chains. Stockpiles at wholesalers climbed 1.3% to $913.1 billion, also an all-time high. 

More complete August trade figures that include the balance on the services account will be released on Oct. 5.

(Adds graphic and economist’s quote)

©2022 Bloomberg L.P.