China's exports were surprisingly buoyant in July as shipments to top trade partner Europe jumped by the most in at least a year, allaying concerns that debt problems abroad may hold back the world's No. 2 economy.

But analysts cautioned it was too soon to declare that Chinese exports can hold up in coming months as debt problems and sluggish consumer spending plague its two biggest markets, the United States and Europe.

China's trade sector is still facing great uncertainties, said Nie Wen, an analyst at Hwabao Trust in Shanghai. Developed countries are forced to take austerity measures, and emerging markets may tighten (policy) as well to tame inflation.

July exports rose 20.4 percent from a year ago, the strongest gain since April and surpassing economists' median forecast for a 17.4 percent rise, data on Wednesday showed.

Imports were roughly in line with expectations, rising 22.9 percent in July from a year earlier, the General Administration of Customs said. Economists had forecast growth of 22.3 percent.

Both imports and exports are likely to grow at a slower pace in coming months, said Li Xunlei, an economist at Guotai Junan Securities in Shanghai. The global financial market turbulence may lead to a contraction in external demand.

Indeed, just hours earlier, the U.S. Federal Reserve took the unprecedented step of promising to leave interest rates near zero for at least two more years, painting a gloomy picture for the world's largest economy.

Noting that monetary policy risks are shifting to supporting growth from fighting inflation, China has signaled it may pause its 10-month policy tightening campaign for now.

PRESSURE ON YUAN TO RISE

Other data this week showed that China's inflation hit three-year highs in July, and some officials have said that it has likely peaked.

But underlining the fine balance that Beijing has to tread between managing growth and inflation, July's brisk export sales caused China's trade surplus to balloon to $31.5 billion, its widest since January 2009.

That could fuel price pressures at home and more criticism from its trade partners abroad that Beijing is keeping its yuan currency suppressed to sell more exports at their expense, allegations China has always denied.

As part of Beijing's policy to prevent the yuan from rising too quickly, it buys dollars earned from trade revenues. But Beijing injects more than 6 yuan into China's banking system for every dollar it buys, adding to a surfeit of cash that fans inflation.

So even if Beijing is reluctant to tighten policy now, it may need to step aside nonetheless to let the yuan climb more briskly if it wants to keep a lid on prices, analysts said.

China's monetary policy has been kidnapped by foreign capital inflows, said Zhang Lei, an analyst at Minsheng Securities in Shanghai, referring to the widening trade surplus.

Yuan appreciation is still one important option.

CHINA IS OK

To be sure, all signs suggest that China's economy has taken the steady policy tightening in the past year well in its stride, with its red-hot economic growth moderating only slightly so far.

Many economists agreed that the latest trade data showed China's growth engine is whirring along, keeping domestic demand solid.

That should comfort investors looking to China to pick up some slack in global demand should other major economies sputter.

And China's relatively low -- albeit rising -- production costs could keep its exports competitive when times are rough, analysts said.

In the past couple of months, the U.S. economy has been turning down, but China's export growth has held out, said Ting Lu, an economist at Bank of America-Merrill Lynch.

This shows China's economy is okay.

Beijing, which has repeatedly voiced confidence in China's growth in the past year, reiterated the line this week.

Premier Wen Jiabao said on Tuesday that China's economy continues to show good growth momentum. But in a sign Beijing would rather err on the side of caution, he signaled China may soften its strike against inflation.

An official Chinese newspaper also said as much on Wednesday by declaring in a front-page editorial that Beijing would refrain from raising rates for now due to the rout in global markets.

However, China top economic planner said inflation dangers remained, including the possibility of a new round of monetary easing in the United States which could fuel fresh price pressures.

(Reporting by Beijing economics team; Editing by Ken Wills & Kim Coghill)