The stock market rebounded from an early stumble Wednesday to finish moderately higher after a sign of stronger-than-expected demand for oil lifted hopes for an economic recovery.
The major U.S. equity indexes opened lower in reaction to a plunge in China's biggest stock market but reversed course after the Energy Department reported that oil inventories shrank in the last week. Analysts had expected the report to show an increase in stockpiles of crude.
Stock investors saw the decline as an indication of rising energy demand and an improving economy.
The Dow Jones industrials climbed 61.22 points, or 0.7%, to 9,279.16. The Standard & Poor's 500 index rose 6.79 points, or 0.7%, to 996.46, while the Nasdaq composite index finished up 13.32 points, or 0.7%, at 1,969.24.
The Russell 2,000 index of smaller companies rose 0.9%.
About three stocks rose for every two that fell on the New York Stock Exchange. Volume was light.
Oil futures jumped $3.23 to $72.42 a barrel on the New York Mercantile Exchange.
Analysts said Wall Street's gains Wednesday were probably magnified by short-covering, in which investors have to buy stock after having sold borrowed shares in a bet that they would fall. That rush to cover ill-timed bets can quicken the market's climb.
At the same time, some money managers who aren't fully invested in stocks are still afraid of missing out on a rally that began in March and has continued despite periodic setbacks.
"As the market creeps higher, people are kind of forced to buy," said Nick Kalivas, vice president of financial research at MF Global. "The action today especially has been much stronger than I would hope, and it is making me nervous about my bearish view."
Despite the rise in stocks, yields on Treasury bonds fell, suggesting that some investors felt the need for the haven of U.S. government debt.
The yield on the benchmark 10-year Treasury note fell to 3.46% from 3.52% late Tuesday. It was trading at about 3.44% before the oil report.
Among the day's highlights:
* Deere gained 2.9% after its earnings beat the estimates of Wall Street analysts.
* Merck rose 2.5% after a federal judge ruled in favor of the drug maker in a patent fight with an Israeli company that wants to sell a generic version of Merck's top-selling asthma drug.
* Among energy stocks, Murphy Oil jumped 3.1%, while Exxon Mobil climbed 2.3%.
* Shanghai's key stock index plunged 4.3%. The gauge has lost nearly 20% this month on worries about the strength of China's recovery and a possible clamp on Beijing's easy credit policy that helped fuel a rally in Chinese stocks earlier this year.