China's trade surplus widened last month to its largest since 1981, the General Administration of Customs said Thursday. The surplus was $78.17 billion in December from $47.25 billion in the same month a year ago.

Predictably, its trade surplus with the U.S. narrowed to $29.92 billion in December from $37.42 billion in November.

The result beat market expectations for a $72.35 billion surplus. Exports rose 18.1% year on year while imports rose at a softer 6.5%, the administration said.

The country's surplus for 2020 was $536.09 billion.

The 18.1% increase in December exports followed a 21.1% growth in November and was also about the market's expectations for a 15% rise. It is the fourth consecutive month of increases in exports, the administration said attributing the performance to a world economy recovering from the COVID-19 crisis.

"China is the only one major economy in the world that has reached a positive growth in goods trade in 2020. The status of China as the largest goods trading nation has been further consolidated," customs spokesman Li Kuiwen said.

"Trade imports and exports were significantly better than expected, and the scale of foreign trade hit a record high," Li said.

Analysts have said China's exports will continue to be supported by demand for medical supplies and work-from-home products in important trading partners struggling with fresh waves of coronavirus infections.

Meanwhile, goods and services imported by China rose 6.5% year on year in December -  following on from a 4.5% rise in November. The December number was more than the 5% predicted in a market consensus.

Again, imports showed a fourth month of increase as a result of improving domestic demand and higher commodity prices, the administration said.

 "Exports continued to do well last month, as renewed lockdowns abroad ensured the shift in consumption from services to goods persisted in many of China's trading partners. Meanwhile, a pickup in import growth suggests that domestic demand remains strong. We think trade will remain resilient in the near term but will soften later this year," Capital Economics senior China economist Julian Evans-Pritchard told the South China Morning Post.

"In the near term, the tailwinds from last year's stimulus should keep imports strong for a while longer. And although the export orders component of the manufacturing purchasing managers' indexes dropped back slightly in December it still appears consistent with rapid export growth.

"But further ahead, the current strength of exports is unlikely to be sustained indefinitely, especially given that consumption patterns overseas should gradually return to normal as vaccines are rolled out. And imports are likely to drop back as policy support is gradually withdrawn throughout this year," Evans-Pritchard said.