Japan saw its biggest current account surplus in nearly two years in February as goods imports plummeted due to coronavirus-related factory closures in China, government data showed Wednesday.

The current account was ¥3.17 trillion ($29 billion) in the black, the third-largest figure on record and the most since March 2018, according to a preliminary report released by the Finance Ministry.

It marked the 68th straight month of surplus in one of the widest gauges of international trade.

Among key components, Japan had a goods trade surplus of ¥1.37 trillion, up ¥877.2 billion from the previous year amid plummeting imports of clothing and mobile phones from China, where the coronavirus outbreak was peaking in the reporting month.

Natural gas imports from Australia were also down, while exports of electronic components to the rest of Asia increased.

Japan logged a services trade deficit of ¥136.6 billion, the second straight month of red ink, as income from intellectual property including payments by foreign manufacturers for use of Japanese patents also declined due to the coronavirus.

Visitors from overseas in February fell to less than half the previous year's figure, further contributing to the services trade deficit, a ministry official said. The arrival of Chinese tourists nearly completely stopped after China imposed a ban on group trips abroad, while South Koreans also avoided travel due to fears over COVID-19.

Meanwhile, Japan's primary income saw a surplus of ¥2.08 trillion as overseas returns from portfolio investments increased.