Surprisingly firm rebounds in China's exports and imports in July offered some hope that the world's second-largest economy might be stabilizing after more than two years of slowing growth, although an imminent rebound still looks unlikely.

Imports of crude oil and iron ore rebounded from multi-month lows to record highs last month as more raw materials were shipped in to rebuild depleted stocks, and soy bean purchases hit a record for the second straight month.

A steadying of the economy would be a relief to China's leaders, who have scrambled to shore up growth since mid-year amid concerns a sharp slowdown could derail their attempts to reform the economy so it was driven more by consumption than debt-funded investment and manufacturing.

Data from the Customs Administration showed exports rose 5.1 percent in July from a year ago, a smart turnaround from their first fall in 17 months in June. Analysts had expected a 3 percent rise.

Imports fared even better with a 10.9 percent jump from a year earlier, more than five times what analysts had forecast. The surprising strength in imports left China with a smaller-than-expected trade surplus of $17.8 billion.

"July seems to reflect a return to a 'normal', relatively uninspiring trend," analysts from Moody's said in a note.

"In other words, while the worst seems to be over, the upturn will be relatively flat."

Indeed, exports in the three months ended July 31 posted the slowest annual increase since October 2009, a Reuters calculation showed.

Still, Asian stocks rebounded on the data and the Australian dollar leapt a third of a cent on hopes that Chinese demand may have found a floor.

China's trade performance has whipsawed this year after data was first inflated by companies reporting fakes deals to disguise illicit cash transfers, and then subsequently deflated by the government as it quashed the fictitious transactions.

Analysts said the July data probably had minimal distortions, but some cautioned against concluding the upbeat performance was driven by an actual improvement in final demand.

STRONG COMMODITY IMPORTS

There was an overwhelming improvement in commodity imports last month, with iron ore purchases jumping 17 percent from June to a record high of 62.3 million tons.

Some commodity analysts said July shipments may have been inflated by unprocessed deals from June.

"I would think it has something to do with the fact that the June number was low and there was some catch-up tonnage coming through," said Graeme Train, analyst with Macquarie in Shanghai.

But the overall trends remain strong, Train added.

"It has been a volatile series of data but I anticipate the trend for strong (iron ore) imports to continue."

Soy imports also hit a record high for the second straight month, though again analysts said that was partly due to delayed shipments finally arriving from congested Brazilian ports.

Crude oil imports, on the other hand, were likely lifted by refiners replenishing stocks after a three-month lull and as some new refineries started business.

"The monthly data is very volatile. I wouldn't read too much into it and say that domestic demand is strong," said Zhang Zhiwei, an economist at Nomura in Hong Kong.

U.S., EUROPE EXPORTS UP

Exports to the United States rose an annual 5.3 percent and those to Europe were up 2.8 percent, as China's two biggest markets posted their strongest gains since February. Shipments to southeast Asia were also up on the year.

With the U.S. economy showing signs of a gradual recovery, Ting Lu, an economist at Bank of America-Merrill Lynch, said Chinese exporters could benefit further in coming months.

The trade figures were seen as a positive sign for industrial output data on Friday, with economists expecting production to show an annual rise of 9 percent in July.

Fixed asset investment is forecast to have risen 20 percent in the first seven months of the year, in line with growth in the first six months, while inflation is forecast to have quickened to a five-month high of 2.8 percent.

Top leaders in Beijing have made clear they will accept a slowdown in growth as they restructure the Chinese economy, but have indicated that annual growth should not be allowed to slip below 7 percent.

The economy has slowed in nine of the past 10 quarters, but the government has stressed it is confident of meeting its 7.5 percent growth target this year -- the lowest in 23 years.

"This strong data supports our view that while economic growth will slow in the second-half of the year, it should do so only moderately, to 7.4 percent in the third quarter and 7.2 percent in the fourth quarter," Nomura's Zhang said.

(Reporting by China economics team; Editing by John Mair)