China recorded a rare trade deficit in the first quarter of the year on the back of domestic economic strength and rising global commodity prices, the customs administration said on Sunday.

From January to March, China imported $1.02 billion more than it exported, marking its first quarterly trade deficit since 2004, the General Administration of Customs said.

The trade numbers showed that China's economy was evolving in a more sustainable direction by becoming less reliant on exports, said Isaac Meng, economist with BNP Paribas in Beijing. That is an essential ingredient in the rebalancing that analysts say is needed to put the global economy on more stable footing.

Even though the exchange rate is only slowly appreciating, strong inflation, especially labor costs, is making the rebalancing happen, Meng said.

Zheng Yuesheng, statistics chief with the customs administration, told state television that the first-quarter deficit was likely to be temporary, but added that the full-year trade surplus would be smaller in 2011 than 2010.

In March alone, China reported a tiny trade surplus of $140 million, following a $7.3 billion deficit in February.

China's exports were up 35.8 percent in March from a year earlier, while imports rose 27.3 percent from a year earlier. Economists had expected exports to rise 21.0 percent year on year and imports to increase 19.5 percent year on year, producing a trade deficit of $4.2 billion.

The first-quarter trade deficit is partly a seasonal issue because Chinese exports tend to be slow early in the year. But it also speaks to the progress that China is making toward having a more balanced trade relationship with the rest of the world.

Less about any specific policy, this is a reflection of basic economic reality. China already is the world's biggest exporter and so has little scope to increase its exports further, while its demand for imports is increasing in leaps and bounds alongside its ultra-fast growth.

REBALANCING

China has faced calls from the United States, the European Union and others to let its yuan currency appreciate more quickly as a way to cut its yawning trade surplus.

Beijing has opted for gradual nominal appreciation -- the yuan has gained just 4.5 percent against the dollar since being depegged last June -- but rising costs are translating into faster real appreciation and denting demand for Chinese exports.

On the import side, officials have repeatedly vowed to buy more foreign products to reduce the country's huge trade surplus. For now, though, soaring global commodity costs were the more immediate factor driving up China's import bill.

Prices of primary products -- raw materials and energy -- jumped 29.7 percent in the first quarter, significantly pushing up the cost of Chinese imports.

For instance, import prices of iron ore, a key input for Chinese steelmakers, jumped 59.5 percent in the first quarter from a year earlier, the customs administration said.

In another example, soybean import prices -- China is the world's biggest buyer -- rose 25.7 percent in the first quarter, though absolute import volume fell 0.7 percent year on year.

Wang Hu, an economist with Guotai Jun'an Securities in Shanghai, said Chinese imports were always strong in the first quarter as domestic firms make purchases for full-year investment and production plans.

China's exports are likely to remain strong in coming months with recovering demands in the United States and Europe, and China will report a trade surplus in coming months, Wang said.

JAPAN IMPACT

The biggest question mark hanging over China's trade activity is the extent to which Japan's earthquake, tsunami and nuclear crisis will cause trouble.

People are still trying to assess the impact of Japan, so it's not easy to say whether this pace can be maintained. It is likely to slow down much more in the second quarter, said BNP's Meng.

The Japanese disaster was already have an impact, Zheng, the customs official, told state television.

As the world's third largest economy and the biggest source of Chinese imports, Japan is set to affect part of China's foreign trade, Zheng said.

Chinese imports from Japan rose 16.6 percent year on year in March, 2.4 percentage points lower than the 19.0 percent pace recorded in February.

China's imports of auto parts and machinery will bear the brunt of disrupted production in Japan, Zheng added.

Wang from Guotai Jun'an said the disaster in Japan may help Chinese exports in the long run despite short-term disruptions.

Japan accounted for about 8 percent of Chinese exports, and the immediate impact will not be significant. From a longer-term view, the reconstruction in Japan will mean huge demand for Chinese products, Wang said.

(Reporting by Zhou Xin and Simon Rabinovitch)