Japan’s exports plunged 19.2% in July from a year earlier, as the coronavirus pandemic sapped global demand for goods from the third largest economy, government data showed Wednesday.

The Finance Ministry’s provisional numbers showed Japan’s imports fell 22.3% in July.

Exports to the U.S. especially suffered, declining 19.5%. Shipments of plastic goods, iron and steel and computer parts weakened.

FILE - In this July 31, 2020, file photo, people wearing face masks against the spread of the coronavirus walk at Shibuya pedestrian crossings in Tokyo. Japan’s exports plunged 19.2% in July from a year earlier, as the coronavirus pandemic sapped global demand for goods from the third largest economy, government data showed Wednesday, Aug. 19, 2020. (AP PhotoEugene Hoshiko, File)

FILE - In this July 31, 2020, file photo, people wearing face masks against the spread of the coronavirus walk at Shibuya pedestrian crossings in Tokyo. Japan’s exports plunged 19.2% in July from a year earlier, as the coronavirus pandemic sapped global demand for goods from the third largest economy, government data showed Wednesday, Aug. 19, 2020. (AP PhotoEugene Hoshiko, File)

But Japan recorded its first trade surplus in four months on the back of a recovery in China, where the coronavirus outbreak began.

Exports to China, including metals, paper products and machinery, grew 8.2% in July.

Japan's economy is heavily reliant on exports, so weak demand in major overseas markets is constraining its growth. The pandemic has caused some plant production to be temporarily halted, squelched tourism and generally hurt economic activity.

The economy has been in recession for all of 2020 so far even though it has never had full lockdowns. Instead, authorities have encouraged people to work from home, wear masks and practice social distancing. Some stores have closed or shortened their hours.

Japan has reported about 1,100 deaths attributed to COVID-19 so far, fewer than harder hit nations like the U.S. and Brazil. Worries are growing over a recent surge in cases, especially in Tokyo and other urban areas.

Yuri Kageyama is on Twitter https://twitter.com/yurikageyama