China’s exports accelerated in June, jumping 27% from a year earlier thanks partly to the boom in artificial intelligence, the customs agency said Tuesday.

The increase in exports in June was much better than economists had expected. Exports rose 19.4% year-on-year in May.

Imports in June surged 36%, better than May’s 27.4% year-on-year growth, with analysts attributing the expansion in part due to the Iran war driving up import costs.

China recorded a trade surplus of $125.6 billion in June, widening from $105.4 billion in the previous month.

“With the rapid growth of AI, our imports and export of products in this field are robust,” Wang Jun, vice minister of China’s General Administration of Customs, said at a news conference in Beijing.

He said trade in electronic components, computer spare parts, and other computing hardware jumped nearly 57% to 5.1 trillion yuan ($760 billion) in the first half of the year. Other products such as AI glasses, AI translating devices, powered exoskeletons and other smart products are also evolving.

“Trade values took another big leg up in June,” Julian Evans-Pritchard, head of China Economics at Capital Economics, wrote in a note Tuesday. “This predominantly reflects the recent surge in semiconductor prices on the back of the AI boom. But even putting that aside, foreign demand for Chinese goods remains robust.”

China’s exports of vehicles, especially EVs, and other tech-related products have boomed as rapid adoption of AI increases the need for semiconductors and other electronic equipment.

The strength in export manufacturing has helped to offset prolonged weakness in domestic spending and investment due to a prolonged downturn in the property industry.

In January-June, China’s exports climbed 17.6% from a year earlier, while imports jumped 26.6%, according to the customs data.

Policymakers including those in the U.S. and in Europe have express alarm over rising trade deficits with China. In order to bypass barriers such as higher tariffs, Chinese businesses have been moving factories to regions like Europe. China has also been exporting more to Southeast Asia, Latin America and Africa.

Wang, the customs official, acknowledged the threat from rising trade barriers.

“We still face serious risks and challenges in the second half of the year,” he said.

While China’s export growth is likely to continue, it is becoming increasingly fragile, said Wei Li, head of Multi-Asset Investments at BNP Paribas Securities (China). Robust shipments in autos and AI-related items will remain dependent on global demand and regulatory barriers, he said.

Exports to Southeast Asia in June surged nearly 35% from a year ago, while those to the European Union and Latin America increased more than 18% and 28%, respectively.

Exports to the United States climbed almost 14% from a year earlier. China’s shipments to the U.S. have risen in recent months, partly due to declines in shipments a year earlier after President Donald Trump returned to office last year and implemented higher tariffs.

China is set to announce its economic growth data for the April-June quarter on Wednesday. Chinese leaders have set an annual growth target of 4.5% to 5% for this year, slightly lower than the 5% growth in 2025.

Last week, the International Monetary Fund raised China’s annual growth forecast by 0.2 percentage point to 4.6%. But it said it expects China’s economy to expand just 4.1% in 2027.

Chinese leaders have sought to boost consumer spending through various initiatives, including trade-in subsidies for autos and home appliances. But many ordinary Chinese have been feeling the pressure from a slowing economy and avoiding big-ticket purchases.

___

AP Videographer Borg Wong contributed from Beijing.

This story was originally featured on Fortune.com

Read More