Japan's exports rose for a ninth consecutive month in May, supported by a weaker yen, elevated commodity prices and strong demand for semiconductors, even as disruptions linked to the conflict involving the United States, Israel and Iran weighed on global trade flows, according to government data reported by Reuters.

Exports by value increased 17% year-on-year in May, exceeding market expectations of a 16.2% rise and accelerating from April's 14.8% growth. However, export volumes grew by just 0.5%, indicating that much of the increase was driven by price effects rather than stronger underlying demand, Reuters reported.

The surge in exports was largely led by electronic components, with robust demand from artificial intelligence applications and data centres boosting prices for memory chips and non-ferrous metals. Shipments to key markets remained strong, with exports to the United States rising 12.5% and those to China climbing 17.9% from a year earlier.

Imports also increased, rising 12.5% in May compared with the same period last year. While the figure was slightly below market expectations, higher energy prices continued to inflate import costs. According to Reuters, the closure of the Strait of Hormuz significantly raised crude oil prices, offsetting the impact of lower import volumes.

Japan's crude oil imports fell sharply, dropping 28.5% in value terms and 57.3% by volume. The cost per unit of imported crude in yen terms reached a record high, highlighting the pressure on the country's energy-dependent economy.

Despite the rise in trade activity, Japan recorded a trade deficit of 378.7 billion yen ($2.36 billion) in May. The deficit was smaller than economists' expectations of 564.6 billion yen, reflecting stronger-than-anticipated export performance.

Separate data released on Wednesday showed Japan's core machinery orders increased 8.7% in April from the previous month, significantly outperforming forecasts. Reuters reported that the stronger reading could indicate a gradual recovery in corporate investment spending.

Japan has been particularly vulnerable to disruptions in Middle Eastern energy supplies due to its heavy reliance on imported fuel. The government has sought to diversify sourcing by increasing purchases from alternative suppliers, including the United States. However, these efforts have yet to fully offset the impact of reduced shipments from the Middle East.

Data showed crude oil imports from the Middle East fell 61.9% by volume in May, while imports from the United States increased 24%, according to Reuters.

Although U.S. and Iranian officials recently agreed on a framework aimed at ending hostilities and reopening the Strait of Hormuz, analysts remain cautious about the speed of recovery in global shipping networks. Damage to energy infrastructure, ongoing security concerns and the need to restore maritime insurance coverage could continue to affect trade and energy markets in the near term.

Economists warn that prolonged energy price pressures could eventually weigh on Japan's export outlook by worsening trade conditions and dampening global demand, even as sectors linked to artificial intelligence continue to provide support for economic activity.

The AI-driven technology boom has helped cushion parts of the global economy from the immediate effects of geopolitical disruptions, offering some relief to export-oriented economies such as Japan.