Japan posted a current account surplus of ¥287.1 billion in August for the second straight month of black ink despite a big trade deficit, as income from foreign investments surged to a record high for the month, the government said Wednesday.

Exports rose 1.0 percent from a year earlier to ¥5.64 trillion amid growing shipments of metalworking machinery, but imports climbed 2.3 percent to ¥6.48 trillion due in part to rising imports of liquefied natural gas, bringing the goods trade deficit to ¥831.8 billion, also a record high for the month, the Finance Ministry said.

The surplus in the primary income account, which reflects how much Japan earns from its foreign investments, jumped 20.6 percent to ¥1.51 trillion, up for the second straight month, buoyed by dividends from foreign direct investment with the yen weakening, the ministry said in a preliminary report.