Japan posted a current account surplus for the 23rd consecutive month in May, but its size shrank for the first time in 22 months as a firming yen reduced profits in foreign investments, the government said Friday.

The surplus fell 2.4 percent from a year earlier to ¥1.81 trillion ($17.9 billion), the first decline since July 2014, the Finance Ministry said in a preliminary report.

Among key components in the current account, one of the widest gauges of a country's international trade, the trade in goods registered a surplus of ¥39.9 billion, a turnaround from a deficit of ¥48.7 billion a year earlier.