New York - US stocks finished higher on Tuesday in a topsy-turvy session, rallying after worries about Greece and China caused deep losses in early trade.
The Dow Jones Industrial Average ended up 93.33 points (0.53%) to 17 76.91 after earlier falling more than 200 points.
The broad-based S&P 500 jumped 12.58 (0.61%) to 2 081.34, while the tech-rich Nasdaq Composite Index rose 5.52 (0.11%) to 4 997.46.
Analysts described unease at the latest drops in Chinese stocks, a sign efforts by the Chinese government to stabilise equity markets are falling short. Chinese stocks have fallen more than 30% since mid-June.
Worries about Greece also dragged on stocks. German Chancellor Angela Merkel and French President Francois Hollande said Athens must offer "precise" proposals to restart bailout talks.
Gregori Volokhine, president of Meeschaert Capital Markets, said the mid-session rally shows US investors remains fairly optimistic despite Greece and China.
"The market is not genuinely scared," he said.
Other analysts said the rally was a technical bounce after equities held above a critical level.
US-listed Chinese companies fell, including e-commerce giant Alibaba (-0.8%), as well as the smaller social networking platform Renren (-7.0%), Qihoo 360 (-7.1%) and Youku Tudou (-6.7%).
Banking shares were weak, including Dow member JPMorgan Chase (-0.8%), Citigroup (-1.1%) and Bank of America (-1.5%).
Consumer products stocks jumped, with Procter & Gamble and Colgate-Palmolive gaining 2.1% and Kimberly-Clark rising 2.0%.
Pharma company Depomed powered 38.7% higher following an unsolicited takeover bid from Horizon Pharma for about $3bn. Horizon declined 2.0%.
Tesla Motors fell 4.2% following a downgrade from Deutsche Bank, which said it remains bullish on Tesla's prospects, but that the stock is fully valued.
Bond prices rose. The yield on the 10-year US Treasury fell to 2.26% from 2.29%, while the 30-year dropped to 3.04% from 3.09%. Bond prices and yields move inversely.