Japan's exports in May jumped 49.6 percent from a year ago to post the sharpest rise in over four decades, with their rebound from a coronavirus pandemic-induced downturn driven by solid demand for cars and auto parts, government data showed Wednesday.

Exports of goods surged to 6.26 trillion yen ($57 billion) in the reporting month, increasing at the fastest pace since a record 51.4 percent leap was logged in April 1980, according to the preliminary data released by the Finance Ministry, which began compiling the statistics in January 1979.

After expanding 16.1 percent in March and 38.0 percent in April, exports grew for the third consecutive month, partly in reaction to a 28.3 percent year-on-year fall seen in May last year due to the initial shock of the pandemic that pushed down global demand and disrupted supply chains.

Exports of both cars and auto parts more than doubled, up 135.5 percent and 139.1 percent from a year earlier, respectively. Demand for the auto-related Japanese products was strong especially from the United States, a ministry official told reporters.

Imports also saw a remarkable rise of 27.9 percent to 6.45 trillion yen, up for the fourth straight month following a 12.8 percent boost in April, due to a recovery of domestic consumption and rebound in crude oil prices.

Compared with May 2019 before the outbreak of the pandemic, the value of exports was up 7.3 percent, while that of imports was down 5.2 percent, the official said.

The country's goods trade balance with the rest of the world came to a deficit of 187.15 billion yen, the first red ink in four months.

By country, Japan's exports to the United States and the European Union posted the fastest rises on record of 87.9 percent and 69.6 percent, respectively, underpinned by brisk demand for automobiles and car parts.

Imports of U.S. and EU goods saw 28.7 percent and 39.4 percent respective gains, with pharmaceutical products contributing most to the outcome. The official said that Japan's purchase of COVID-19 vaccines is likely to have pushed up the figures.

As a result, Japan saw a 360.86 billion yen surplus against the United States, and a 188.13 billion yen deficit against the EU.

Exports to China expanded 23.6 percent from the previous year, with shipment of semiconductor-producing equipment soaring 63.9 percent amid a global chip crunch. Hybrid cars and raw materials such as copper scrap also marked sharp increases in Japan's exports to its largest trading partner.

Imports from China climbed 4.8 percent, as rises in products including cellphones and clothes outpaced decreases in such items as yarns and textile goods. That led to a deficit for Japan of 191.79 billion yen.

Exports to Asia as a whole were up 32.5 percent, and imports grew 13.2 percent, with the balance standing at a 532.59 billion yen surplus for Japan.

"Exports surged following the previous year's steep drop, while they were almost flat compared with April following seasonal adjustment, suggesting the recovery in exports may be slowing," said Kazuma Maeda, an economist at Barclays Securities Japan Ltd.

Maeda also pointed out that auto exports in volume terms decreased from the previous month for the second month in a row, possibly affected by the global semiconductor shortage.

As for the outlook, Maeda said consumption in advanced economies will shift from goods to services, which could dampen demand for car and auto parts, and possible declines in shipments of those Japanese products could "weigh on exports as a whole in the coming months."

All figures were compiled on a customs-cleared basis.