Soaring energy prices continued to weigh on Japan's trade balance in May. That pushed up the value of imports, contributing to the numbers remaining in the red for a 10th straight month.
The Finance Ministry says the deficit last month was almost 2.4 trillion yen, or about 18 billion dollars.
The value of imports rose by 48.9 percent in yen terms from a year earlier.
Prices for crude oil increased, while liquefied natural gas was up to two-and-a-half times more expensive. At the same time, the value of coal imports more than tripled.
The yen's depreciation also contributed to pushing up the value of imports to over 9 trillion yen, or about 67 billion dollars, for the first time ever.
Meanwhile, exports were up 15.8 percent. That was partly down to a rise in shipments of steel and semiconductors.
Analysts say Japan's trade balance may remain in the red for a prolonged period of time, as energy prices are stuck at a high level due to Russia's invasion of Ukraine, as well as the weaker yen.