U.S. stocks declined on Tuesday, with the S&P 500 retreating from a record for a second day, as geopolitical concerns overshadowed better-than-expected reports on housing and consumer confidence.
Worries about violence in Iraq and the recent rise in oil prices is "the overall theme that is weighing," said JJ Kinahan, chief strategist at TD Ameritrade.
"Keep in mind the direct tax that everybody's budget takes when the price of oil is up significantly. It could have a direct effect on our economy," Kinahan added.
The CBOE Volatility Index, one measure of investor uncertainty, spiked nearly 11 percent to 12.16.
"We had more volatility in the last 20 minutes than we had in the last two weeks," said one trader, referring to the early afternoon reversal, which came after Dow Jones News Service reported Syrian warplanes struck targets in western Iraq on Tuesday, killing at least 50 people, as Syria joined Iran in coming to the aid of the embattled Baghdad government.
"We're hearing some attacks with Syria and Iraq and what not," Stephen Carl, head equity trader at the Williams Capital Group, said of the market's about face, which had the Dow erasing a 32-point gain and tumbling more than 130 points.
In Iraq, U.S. Secretary of State John Kerry urged Iraqi leaders to form a united front against insurgents now in control of portions of the second-largest oil producer in OPEC.
Walgreen shares fell after the drugstore chain reported a 16 percent rise in its fiscal third-quarter earnings from the year-earlier period, but still missed expectations. Dean Foods rose after the Wall Street Journal cited unidentified sources in reporting Federal authorities had asked for information related to an insider-trading probe of investor Carl Icahn from the food-and-beverage supplier. Vertex Pharmaceuticals surged after a combination of drugs to treat cystic fibrosis improved lung function in a pair of late-stage clinical trials.
After rising to within 9 points of its intraday record, the Dow Jones Industrial Average ended down 119.13 points, or 0.7 percent, at 16,818.13, with Exxon Mobil pacing blue-chip declines that reached 26 of 30 components and marked the benchmark's worst day in more than a month.
After rising to an intraday record of 1,968.18, the fell 12.63 points, or 0.6 percent, to 1,949.98, with energy falling the hardest and utilities faring best among its 10 major sectors.
The Nasdaq dropped 18.32 points, or 0.4 percent, to 4,350.36.
For every share on the rise, nearly two declined on the New York Stock Exchange, where 648 million shares traded. Composite volume surpassed 3 billion.
"At these levels you need a strong catalyst, and I thought we got that, but we've got investors that are nervous about things other than fundamentals, namely geopolitical and valuations, so the path of least resistance is to take chips off the table. There's a large cohort of investors looking for any opportunity to take some money off the table near record highs," said Art Hogan, chief market strategist at Wunderlich Securities.
The Case-Shiller index of home prices rose 10.8 percent in April from the year earlier, and 1.1 percent from the prior month.
"I think that prices are more or less okay where they are. They went up way too high in 2006 and they came down like 50 percent and now they're going up. They look about right and you know, I hope people just don't get so worked up about them. Think about other things in life. There's no reason to expect any huge movements. They are going up, not slowing down," Robert Shiller, co-founder of the Case-Shiller index and professor of economics at Yale University, told CNBC's "Squawk on the Street."
New-home sales for May jumped to a six-year high in May, up 18.6 percent to a seasonally adjusted annual rate of 504,000 units. The number, better than the 440,000 forecast by economists, comes a day after a report that had existing-home sales rising more than expected last month.
Also, the consumer confidence index for June came in at 85.2, beating estimates of 83.
Speaking in New York on Tuesday, Philadelphia Federal Reserve Bank President Charles Plosser said the economy is nearing the central bank's targets more quickly than expected, and could have the Fed increasing interest rates sooner than anticipated.
On Monday, U.S. equities ending little changed, with the Dow halting its longest win streak this year.
—By CNBC's Kate Gibson
Coming Up This Week:
8:30 a.m.: GDP revision
8:30 a.m.: Durable goods orders
8:30 a.m.: Weekly jobless claims
8:30 a.m.: Personal income
8:30 a.m.: Consumer spending
9:55 a.m. Consumer sentiment index
More From CNBC.com: