Japan's current account surplus declined for the second straight month in April to ¥1.71 trillion ($15.7 billion), due partly to sluggish exports to China, government data showed Monday.

The surplus in the current account, one of the widest gauges of international trade, marked the 58th consecutive month of black ink, but decreased 9.5 percent from a year earlier.

Among key components, the country posted a goods trade deficit of ¥98.2 billion, the first red ink since January, with exports falling 3.7 percent from a year before to ¥6.39 trillion, according to a preliminary report released by the Finance Ministry.

"Exports to China including semiconductor manufacturing devices sharply fell in the reporting month" against the backdrop of a slowdown in the Chinese economy amid trade tensions between the United States and China, a ministry official said.

Imports rose 6.9 percent to ¥6.49 trillion, as a rise in crude oil prices pushed up the cost of energy imports.

Primary income, which reflects returns on overseas investments, logged a surplus of ¥2.13 trillion, up 9.6 percent, as overseas investments by companies increased solidly, the ministry official said.

Service trade, which includes cargo shipping and passenger transportation, registered a deficit of ¥312.7 billion, down from ¥442.3 billion the previous year.

The travel surplus stood at ¥256.4 billion, almost unchanged from a year earlier, while inbound tourists in April rose 0.9 percent to 2.93 million.