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.