Japan logged a current account deficit of ¥370.8 billion ($3.2 billion) in December, its first red ink in 18 months, due to higher energy import costs, government data showed Tuesday.

The country's current account balance, one of the widest gauges of international trade, turned red from a ¥1.1 trillion surplus a year earlier, marking the first deficit since that of ¥14.3 billion recorded in June 2020, according to a preliminary report released by the Finance Ministry.

Among key components, the goods trade balance posted a ¥318.7 billion deficit, a turnaround from the previous year's ¥965 billion in black ink.

Imports grew 44.8% in value terms from the previous year to a total of ¥8.1 trillion, rising for the 11th consecutive month, mainly due to a surge in the cost of energy purchases, including of crude oil.

Exports expanded 18.7% to ¥7.8 trillion, up for the 10th straight month, as car shipments recovered following a global chip shortage with a 17.6% increase. Exports of steel and electronic parts such as semiconductors jumped 75.1% and 25.9%, respectively.

Both the import and export values in December were the highest monthly figures since comparable data became available in January 1996, a ministry official told reporters.

The services balance recorded a deficit of ¥321.3 billion, following red ink of ¥312.7 billion a year earlier, as payments for cargo shipping swelled in line with the increase in imports, the official said.

Primary income, reflecting returns on overseas investments, registered a surplus of ¥398.8 billion, down 30.5% from a year earlier, as more Japanese companies paid dividends to overseas shareholders on the back of an improvement in earnings that were hurt by the coronavirus pandemic the year before, the official said.

For 2021, Japan posted a current account surplus of ¥15.4 trillion, down 2.8% from the previous year and marking the fourth straight year of decline.