Japan's current account surplus shrank 20.1% to ¥1.67 trillion ($15 billion) in August from a year earlier, weighed down by a deficit in trade due to higher energy import costs, the Finance Ministry said Friday.

The surplus marked the first year-on-year fall in six months, though Japan remained in the black for the 86th month, helped by rising primary income, or returns on overseas investments, the ministry's preliminary data showed.

In August, imports rose more than exports in value terms, translating into a deficit of ¥372.4 billion, the first red ink figure in seven months.

Crude oil imports saw a roughly 2.2-fold increase in value to ¥369.5 billion while total imports gained 45.9% to ¥6.89 trillion.

Exports rose 27.1% to ¥6.51 trillion as shipments of steel and semiconductor-manufacturing equipment were robust, the data showed.

Still, the impact of supply chain disruptions due to surging coronavirus cases in Southeast Asia began to appear in the reporting month, with car shipments to the United States, China and the European Union falling from a year ago, ministry official said.

Parts shortages have darkened the outlook for automakers as they have been forced to curb production.

Japan had a primary income of ¥2.43 trillion, up 7.6%, buoyed by increased returns on overseas investments such as investment trusts.

The service balance came to a deficit of ¥194.9 billion, much smaller than ¥326.2 billion in the red a year earlier, as royalty payments by overseas companies to Japanese firms increased.

Japan eked out a travel surplus of ¥14.6 billion, down 25.6%, after the number of foreign visitors to the nation increased from a year earlier, even though it stood at only 25,900 due to travel restrictions.

The slight recovery came as athletes and those related to the Tokyo Olympics and Paralympics visited Japan. The Olympics ran from late July to early August and the Paralympics from late August to early September.