Japan’s exports have dropped for the first time in more than two years as patchy overseas demand weakened, signaling headwinds for an economic recovery that has relied increasingly on external markets as domestic spending sputters.

The value of exports fell 0.3% in July from a year earlier, retreating for the first time since February 2021 as sharp falls in shipments of chipmaking gear and parts outweighed a jump in demand for cars, the Finance Ministry reported Thursday. Economists had forecast a 0.2% decline.

Imports fell for a fourth month, sliding 13.5% from the previous year — the steepest decline since September 2020 — as commodity prices ease. Economists had estimated they would fall by 15.2%.