China said its exports jumped 50 percent in May from a year ago, reassuring investors about the path of the global economic recovery despite the euro-zone debt crisis. Europe is China's biggest overseas market.

Commodities prices surged, with crude oil and copper rising as the Chinese export data instilled confidence in demand. China is the world's top base metals consumer and the world's second-biggest oil consumer.

"If China does not slow down then the world doesn't slow down," said Keith Springer, president of Capital Financial Advisory Services in Sacramento, California. "Everything hinges on China. If consumer spending can get to the levels where it was, then we are in a new bull market."

The major US stock indexes rose close to 2 percent on Thursday, a day after a late-day sell-off that had reversed strong gains in what has been a volatile month on Wall Street amid questions over whether expectations of an economic recovery have been overly optimistic.

The strength in the euro helped pull European stocks from an early slump and spilled over to the United States. Movements in US stocks have been closely tied to swings in the euro as investors use the currency as a barometer for confidence in the euro-zone economy.

MSCI's all-country world index and the Thomson Reuters Equity Global Index both rose about 1.7 percent.

At midday in New York, the Dow Jones Industrial Average jumped 174.73 points, or 1.77 percent, to 10,073.98. The Standard & Poor's 500 Index rose 18.75 points, or 1.78 percent, to 1,074.44 and the Nasdaq Composite Index climbed 33.82 points, or 1.57 percent, to 2,192.67.

Energy shares gave one of the biggest boosts to the market, with the S&P energy sector up 3.4 percent, making it the top percentage gainer among S&P sectors.

Chevron Corp. provided the Dow with one of its major boosts, rising 3.3 percent to $73.14.

The PHLX Oil Service Sector index rose 4.2 percent, with Baker Hughes Inc. up 7.6 percent to $41.28 and Halliburton Co gaining 5.5 percent to $23.79.

US-traded shares of oil company BP Plc rebounded more than 10 percent, a day after plunging nearly 16 percent on mounting fears about how the company will cope with the massive costs of the oil spill in the Gulf of Mexico.

In Europe, the pan-European FTSEurofirst 300 closed up 1.57 percent at 1,014.14 points.

Mining shares rose up as the Australian government was said to be diluting its tax hike plans, and banks gained on the robust demand in Spain's government debt auction.

"There's maybe a recycling out of the safe havens, with the dollar and gold down, and a delve back into risk," said Joshua Raymond, strategist at City Index in London. "There are expectations for markets to move gently higher."

The Australian government is due to soon announce major changes to its controversial mining tax, a newspaper said on Thursday, boosting shares of mining stocks in London.

BP's London shares declined 6.65 percent to 366 pence, hitting their lowest level since 1997 as they caught up to the losses in the United States that occurred after UK markets closed on Wednesday.

In Asia, Japan's Nikkei closed 1.1 percent higher.

The euro, drubbed in recent days on concern that investors may balk at funding debt-laden European nations, rose after signs of strong demand at the Spanish bond auction. The currency hit its high for the day as the European Central Bank said its government bond purchase program should not be viewed as a change to monetary policy.

The euro rose 0.87 percent at $1.2089 from a previous session close of $1.1985.

The dollar declined against a basket of major trading-partner currencies, with the US Dollar Index falling 0.79 percent to 87.205. The dollar fell 0.27 percent to 91.01 yen.

Europe's common currency got an earlier boost after Dai Xianglong, chairman of $114 billion China's National Social Security Fund, said the euro would gradually stabilize and that the US fiscal deficit remained a big concern, tempering safe-haven demand for the dollar.

There have been some concerns in currency markets that the debt crisis would persuade central banks, including China's, to cut back on their euro reserves.

US Treasury debt fell as signs of improvement in weekly US jobless insurance claims added fuel to a sell-off ahead of a 30-year bond auction. Benchmark 10-year note yields rose to 3.26 percent.

Other US data showed its trade deficit widened slightly in April, a sign of consumer demand and modest recovery.