China's exports rose sharply in June while imports declined unexpectedly, official figures showed Friday, in further evidence that the world's second-largest economy is charting an uneven recovery.

The customs department said overseas sales of products and services overseas surged 8.6 percent on-year, up from 7.6 percent in May and better than the eight percent forecast in a survey of analysts by Bloomberg.

Exports have historically served as an important economic engine in China, having a direct impact on employment for thousands of companies.

June's reading marked a third consecutive rise, after a year-on-year decline in March.

However, imports unexpectedly dropped 2.3 percent, the data showed, reversing May's 1.8 percent growth and much worse than the 2.5 percent expected.

"This reflects the economic condition in China, with weak domestic demand and strong production capacity relying on exports," Zhiwei Zhang, President and Chief Economist at Pinpoint Asset Management, said in a note.

"The sustainability of strong exports is a major risk for China's economy in the second half of the year," he added.

Officials are grappling with a real estate debt crisis, weakening consumption, an ageing population and geopolitical tensions overseas.

And the latest figures come ahead of a key meeting of leaders in Beijing next week, with all eyes on how they might kickstart lacklustre growth.

That meeting will kick off the same day that China is expected to release its economic growth figures for the second quarter.

Economists at Goldman Sachs also said that "with healthy ex-China demand and Chinese products extremely competitive, exports are likely to stay strong in coming months".

But they warned of "downside risks to exports in 2025 and 2026" if former US president Donald Trump is re-elected in November and slaps "large tariffs on all imports of Chinese goods, as he has suggested in recent months".