Japan's current account surplus increased in the first half of 2018 thanks to increased returns on foreign investments, government data showed Wednesday.

The country's current account, one of the widest measures of international trade, was ¥10.84 trillion ($97 billion) in the black, with the margin rising 2.1 percent from a year earlier despite a smaller goods trade surplus and a deficit in services trade.

The data showed the surplus in primary income, which reflects returns from foreign investments, surged to ¥10.53 trillion as companies raked in dividends from overseas subsidiaries.

Among key components, goods trade came to a surplus of ¥1.82 trillion, down 11.2 percent as rising oil prices pushed up the cost of energy imports. That outpaced an increase in exports of cars to the United States and manufacturing equipment to China, according to a preliminary report released by the Finance Ministry.

Services trade fell further into the red with a deficit of ¥422 billion as companies moved their research and development overseas, even as an influx of tourists from abroad pushed the travel surplus to a record high on a half-year basis.

For the month of June, Japan reported a current account surplus of ¥1.18 trillion, marking the 48th straight month of black ink.

Goods trade saw a surplus of ¥821 billion, up 59.8 percent as energy imports dipped in volume. Services trade logged a deficit of ¥175 billion, while primary income registered a surplus of ¥588 billion.