Japan's trade deficit nearly halved to a one-year low of 432.41 billion yen ($3 billion) in April, as imports dropped for the first time in 27 months on lower crude oil prices, while U.S.-bound auto shipments delivered record exports, the Finance Ministry said Thursday.

Surging energy imports kept resource-poor Japan deeply in the red, with a weaker yen inflating their value. For April, total imports fell 2.3 percent to 8.72 trillion yen, dragged down by crude oil and liquefied natural gas.

Exports, meanwhile, gained 2.6 percent to 8.29 trillion yen, the largest-ever for April. The increase came despite growing concerns about slowdowns in the U.S. and European economies.

Japan reported a trade deficit for the 21st straight month, underscoring its sensitivity to swings in commodity prices. The yen recovered some of the ground lost during its rapid deprecation last year but was still relatively weak against the U.S. dollar.

On average, the dollar traded at 132.23 yen, 7.6 percent higher than a year earlier. The total value of imported crude oil fell for the first time in over two years, down 25.0 percent to 883.0 billion yen.

Japan had a 794.83 billion yen trade surplus with the United States after exports gained 10.5 percent to 1.66 trillion yen while imports rose 1.0 percent to 862.09 billion yen.

With its major trading partner China, Japan logged a trade deficit of 460.88 billion yen. Imports gained 14.8 percent to 1.91 trillion yen, which compare with exports that fell 2.9 percent to 1.45 trillion yen.

"Auto exports have been recovering after they were affected by supply chain bottlenecks. So this is a bright spot in the export numbers that came at a time of slowdown concerns," said Chisato Oshiba, an economist at Dai-ichi Life Research Institute.

"Going forward, however, we cannot be bullish because China's economic recovery is also slow. Crude oil prices have fallen after their earlier sharp gains but are expected to remain at elevated levels, which will blunt the fall in imports," Oshiba added.

In the January-March quarter, Japan's economy rebounded from a technical recession as private consumption remained resilient. But exports marked the sharpest fall in about three years.

Aggressive interest rate hikes in advanced economies, including the United States, have clouded the economic outlook. The Group of Seven nations remain vigilant against such uncertainty, despite the global economy showing resilience so far.

Japan's trade surplus with the rest of Asia, including China, more than halved to 297.87 billion yen while its deficit with the European Union came to 72.40 billion yen, down 62.2 percent from a year earlier.

Related coverage:

Japan posts record 21.73 tril. yen trade deficit for FY 2022

Japan logs record red ink in Jan. on energy, slower export growth

Japan posts 1st trade deficit in electronics for half-year period