Japan’s exports increased by 14.8% in April compared to the same month last year, according to Finance Ministry data released on Thursday. The rise signals strong Japanese trade despite concerns over oil and gas supplies due to the war in Iran.

The export surge, which has continued for the eighth consecutive month, was stronger than anticipated, with shipments of semiconductors increasing nearly 42% by value year-over-year, the Associated Press reported. Demand for computer chips and related infrastructure to support artificial intelligence is benefiting many high-tech Asian manufacturers.

Imports into Japan also rose, climbing 9.7% from a year earlier, the AP noted. Despite the import increase, the overall trade balance shifted to a surplus of 301.9 billion yen ($1.9 billion), a turnaround from a deficit during the same period last year. In March, Japan recorded a surplus of nearly 643 billion yen. The increase was also driven by higher exports of medical products, paper goods, and electrical machinery.

Exports to China rose 15.5%, while those to the U.S. increased 9.5%. Imports from China climbed 15%, and imports from the U.S. jumped 23%, according to the data.

However, oil imports fell nearly 50% by value from a year earlier, and imports of liquefied natural gas dropped 20% due to the effective closure of the Strait of Hormuz, the primary transport route for exports from the Persian Gulf, because of the war in Iran. Japan imports almost all of its oil, and Prime Minister Sanae Takaichi has moved to offset lower supplies by ordering the release of some national oil reserves, the AP reported. Shortfalls have pushed prices higher and impacted the production of oil-related products like naphtha.

The price of Brent crude, which traded at $70 a barrel before the war in Iran, has risen above $100, further compounded by a weakening yen that has made dollar-denominated oil imports more expensive for Japan.