Japan logged a current account surplus of ¥1.91 trillion ($17.3 billion) in July, up 24.5% from a year earlier, aided by increased exports to China and the United States as demand continued to recover from impacts of the COVID-19 pandemic, the Finance Ministry said Wednesday.

The country has remained in the black for 85 months but the surplus level was still lower than that seen in July 2019, before the outbreak of the novel coronavirus.

Among key components, goods trade came to a surplus of ¥622.3 billion, or an increase of 310% from a year earlier, as exports grew in value more than imports.

Exports surged 37.5% to ¥7.22 trillion, buoyed by shipments of cars, auto parts, iron and steel.

Imports jumped 29.3% to ¥6.60 trillion, mainly due to a surge in the value of energy and raw material imports such as crude oil.

Primary income, which reflects returns on overseas investments, recorded a surplus of ¥2.10 trillion, up 10.5%. It was boosted by increased dividend payments that Japanese companies, including automakers, received from their overseas subsidiaries amid rising sales, according to the ministry.

The service balance came to a deficit of ¥584.9 billion, larger than the ¥415.8 billion logged a year earlier, partly because companies stepped up spending on software and services provided by overseas developers to bolster security, in order to cope with more people working remotely.

Japan had a small travel surplus of ¥22.3 billion in July, expanding from ¥21.1 billion a year earlier.

That was in part due to an increase in the number of foreign travelers to Japan, including those related to the Tokyo Olympics from July 23 to Aug. 8. Foreign spectators were barred from the games amid the pandemic.