BEIJING - China's exports rose 3.5% in April from a year earlier, confounding market expectations for a sharp fall, as factories restarted production after the coronavirus pandemic, customs data showed on Thursday, while imports shrank 14.2%.

Analysts in a Reuters poll had forecast exports would tumble 15.7% from a year earlier after a 6.6% drop in March.

Imports were estimated to have contracted 11.2%, worsening from a slide of 0.9% in March.

China posted a trade surplus of $45.34 billion last month, compared with the poll's forecast for a $6.35 billion surplus and $19.93 billion surplus in March.

(Reporting by Stella Qiu and Ryan Woo; Editing by Jacqueline Wong) ((LushaZhang1@thomsonreuters.com; 8610-56692106;))