Japan logged a current account surplus of ¥1.84 trillion in August, marking the 50th straight month of black ink, government data showed Tuesday.

But the margin of surplus in the current account, one of the widest gauges of international trade, shrank 23.4 percent from a year earlier as goods trade registered a deficit for the second consecutive month on oil import surges, according to a preliminary report by the Finance Ministry.

The country had a goods trade deficit of ¥219.3 billion as energy imports such as crude oil and liquid natural gas soared, outpacing a rise in exports led by automobiles and manufacturing equipment for semiconductors.

Services trade came to a deficit of ¥6.1 billion, possibly hurt by the torrential rain that caused flash floods in western Japan in July.

Transport services by air and sea posted a deficit of ¥95.4 billion, while a steady rise in inbound tourists and the addition of their spending on cruise tours helped lift the travel surplus to ¥123 billion.

Meanwhile, primary income, which reflects returns on overseas investments, registered a surplus of ¥2.29 trillion, up 1.8 percent from a year earlier to reach a record high for August.