China posted a surprising trade surplus in March, reversing a hefty deficit in February, but the underlying data indicated that its domestic economy seems to be losing steam, while exports were still weak as the European economy falters.

Exports in March rose 8.9 percent from the year-ago period to $165.6 billion, while imports grew 5.35 percent $160.3 billion, leaving the world's biggest trader of goods with a $5.4 billion trade surplus for the month and a $670 million surplus in the first quarter of 2012, the General Administration of Customs said Tuesday.

Low import figures were partly driven by payback from high growth in previous months. But the underlying message is that domestic demand is still slowing, Qu Hongbin, a China economist in the Hong Kong offices of HSBC, wrote in a Tuesday research note. Today's trade numbers reinforce the need for easing efforts to be stepped up in the coming months.

Exports to the European Union, China's largest trading partner, fell 1.8 percent in the first quarter, while sales to the U.S., its second- biggest trading partner, rose 12.8 percent.

The trade figures are being closely watched for signs of further deterioration in China's economy. The growth in March trade numbers were below China's double-digit levels achieved in recent years, but in line with the combined January-February period.

In February, China reported a huge trade deficit of $31.48 billion -- the largest in more than a decade - hurt by the debt crisis in Europe and the risk of a slow recovery in the U.S.

Trade was a net drag on China's economic growth last year as the world's second-largest economy printed its slowest rate of expansion since 2009, at 9.2 percent, with each quarter's growth in 2011 successively weaker than the previous three months.

Beijing is looking to shift its economy from one hugely dependent on exports to more domestic-oriented growth.

Vice Premier Li Keqiang told an audience at the Boao Economic Forum that strengthening domestic demand is a primary task of the country's strategic economic re-adjustment.

Zheng Yuesheng, director of statistics at the General Administration of Customs, told state television that the current global economic situation is severe, with exports and imports facing relatively big downward risk.

Zheng expects China to record a trade surplus for the full year, though overall trade volume should be smaller than in 2011.