(Bloomberg) -- China’s trade surplus hit a record high in June as exports surged after Shanghai emerged from its crippling Covid lockdown and outbreaks eased.

The trade balance climbed to about $98 billion last month from $79 billion in May, reaching the highest level in at least three decades. Exports in dollar terms grew 18% in June from a year earlier, beating economists’ estimate of a gain of 12.5%, to reach $331 billion, the second highest on record after December 2021. 

Growth in imports weakened to 1% from 4.1% in May, lower than the median estimate of 4% in a Bloomberg survey of economists. 

Covid disruptions to manufacturing and logistics eased last month, allowing factories to ramp up production and Shanghai port, the world’s largest, to accelerate operations. However, outbreaks have continued to pop up and fears have grown of more virus restrictions, clouding the outlook for trade and the world’s second-largest economy.

“The outlook for China’s exports in the second half of the year remains challenging as developed markets’ consumer demand is set to moderate,” said Liu Peiqian, chief China economist at NatWest Group Plc. “We expect China’s exports growth to slow gradually in line with regional peers in coming months.”

The value of rare earth exports grew the fastest in the first half of the year, up 84.5% from a year ago, a breakdown of the data from the customs authority showed. That’s followed by exports of unwrought aluminium and its products and cars. Imports of aircraft, edible vegetable oil and iron ore fell the fastest in value in the first six months of the year.

What Bloomberg Economics Says...

The acceleration in China’s June exports was eye-catching, but it’s not likely to last. The high growth rate likely reflected Shanghai’s reopening and a recovery in transport capacity. Inflation may also have raised the reading. We expect exports to slow through the end of 2022, as overseas demand softens and the impact of a higher year-earlier base starts to bite.

David Qu, China economist

For the full report, click here.

Larry Hu, head of China economics at Macquarie Securities, said the better-than-expected exports could be due to the release of some pent-up demand. The slowdown in imports is a reflection of weak domestic demand, he said, adding that the trade outlook remains volatile as the threats of lockdowns linger.

Exports and imports in Covid-hit regions such as the Yangtze River Delta and the Pearl River Delta areas rapidly returned to growth after an initial decline, Li Kuiwen, a spokesman for General Administration of Customs, told reporters Wednesday. But while trade is expected to maintain steady growth in the second half, the outlook remains uncertain, he said.

Earlier Wednesday, the customs authority reported exports in yuan climbed 13.2% in the first six months of the year compared with the same period in 2021, while imports rose 4.8%.

(Updates with additional details and an economist quote.)

©2022 Bloomberg L.P.