China’s trade with the rest of the world surged to record highs last month, easing fears that a stubborn coronavirus outbreak and the global shipping crisis were stalling the economy.

Exports spiked 25.6% in August from a year ago to $294.3 billion, according to customs statistics published Tuesday. Imports jumped 33.1% over the same period to $236 billion. Both figures were the highest on record. The massive growth compares to 2020 figures made worse by the impact of the coronavirus pandemic, but August’s numbers were also well above economists’ expectations, and stronger than gains seen in July.

For the first eight months of 2021, exports and imports rose 34% and 35%, respectively, compared with the same period last year. China’s trade surplus hit $362.5 billion, up nearly 30%. The surprisingly solid trade data “points to resilience” in the Chinese economy, said Louis Kuijs, head of Asia economics at Oxford Economics. “While near-term headwinds remain, supply constraints in China have eased and we think the global economic recovery will continue to underpin China’s exports in the end of this year and in 2022,” he wrote in a research report on Tuesday.

Exports were aided by shipments of electronics and household appliances. The United States was China’s top export market: The country bought $51.7 billion worth of goods in total in August. “The bottom line is that China’s trade data continues to act to mitigate against the impact of slowing domestic growth,” said Mitul Kotecha, chief emerging Asia and Europe strategist for TD Securities. The Chinese economy has weathered the Covid 19 pandemic stronger than other major economies. But it faces a lot of challenges. Recently, China experienced its worst coronavirus outbreak in a year spurring authorities to take dramatic measures to stop new infections, including locking down cities, canceling flights and suspending trade. Supply bottlenecks and tighter credit conditions have also weighed on activity, while a sweeping regulatory crackdown on tech, education and other sectors has shaken investor confidence and wiped trillions of dollars off the market value of Chinese companies.