BEIJING, Jan 13 (Reuters) - China's December exports fell by a more-than-expected 6.1 percent from a year earlier, while imports beat forecasts slightly, growing 3.1 percent on strong demand for commodities from coal to iron ore, official data showed on Friday.
That left the country with a trade surplus of $40.82 billion for the month, the General Administration of Customs said.
Exports in all of 2016 fell 7.7 percent from a year earlier, while imports slid 5.5 percent. China's Jan-Dec trade surplus was $509.96 billion.
Analysts polled by Reuters had expected December exports to have fallen 3.5 percent on-year, a contraction from an unexpectedly 0.1 percent rise in November and pointing to persistently sluggish global demand.
Imports were expected to have grown for a second month but at a slower pace of 2.7 percent, after soaring 6.7 percent in November.
The trade surplus was forecast to have climbed to $46.50 billion in December, versus November's $44.61 billion, with growing attention on its large trade surplus with the United States.
China, the world's largest trading nation, could be heavily exposed to protectionist measures this year if U.S. President-elect Donald Trump follows through on campaign pledges to brand it a currency manipulator and impose heavy tariffs on imports of Chinese goods. (Reporting by Beijing Monitoring Desk; Editing by)