Traders said the market was ripe for a pullback after the S&P 500 rose to a high of 1,426, surpassing its May 15, 2008, close of 1,423.
"The market was overbought," said Peter Boockvar, chief market strategist with Miller Tabak & Co. "We've been going up every single day."
All three indexes are trading around the highest levels in four years, but the volume of shares being bought and sold has been exceptionally low.
Shares of Apple(AAPL) fell one day after the stock rose to a new record high. In addition, Apple was downgraded to "hold" by analysts at Oracle Investment Research, who cited concerns about the "hype" surrounding the widely-held stock.
With no U.S. economic data and few corporate reports on the agenda, investors focused on developments in Europe.
Spain drew strong demand at an auction Tuesday of €3.5 billion of short-term Treasury bills. The nation's borrowing costs have come down significantly since European Central Bank president Mario Draghi suggested the ECB could buy Spanish bonds if Madrid requests support from the eurozone bailout fund. Italian bond yields also fell, as many investors see Italy as vulnerable to contagion from Spain.
Meanwhile, investors are also keeping tabs on the Federal Reserve.
The central bank will release minutes from its July meeting Wednesday afternoon. While the Fed didn't announce any further stimulus measures at its latest meeting, investors will look for clues about whether quantitative easing could be coming when chairman Ben Bernanke speaks at the Jackson Hole, Wyo., symposium at the end of the month.
The market has been supported by a "central bank put," said Boockvar, which has caused investors to overlook a deteriorating outlook for economic and earnings growth.
As the second-quarter earnings season draws to a close, analysts at S&P Capital IQ are predicting an overall earnings growth rate of 0.86% for the companies in the S&P 500. That would be the lowest growth rate since the third-quarter of 2009.
Companies:Best Buy(BBY) reported earnings early Tuesday that fell far short of analyst expectations, sending the retailer's stock down sharply. Best Buy also cut its outlook and suspended its stock buyback plan.
The disappointing report comes after the company announced that it had reached an impasse with founder Richard Schulze in his attempt to buy its outstanding shares, and named Hubert Joly, the former head of Carlson Wagonlit Travel, as its new CEO.
Barnes & Noble(BKS) reported a loss of 78 cents a share -- 20 cents better than analysts had expected. The bookseller credited sales of the "50 Shades of Grey" trilogy for boosting its bottom line.
Dell(DELL) reported its quarterly results after the closing bell Tuesday. It posted earnings of 50 cents a share, topping forecasts. But shares fell after hours on disappointing guidance.
Shares of Facebook(FB) continued to slide Tuesday, following news that one of the social networking site's first big investors sold most of his stake. Peter Thiel, who became a Facebook investor in 2004, sold 16.8 million shares in the IPO, netting $640 million.
Hedge fund manager George Soros said Monday that he had taken a small stake in British soccer team Manchester United(MANU), which debuted on the New York Stock Exchange earlier this month.
Currenciesandcommodities: The dollar edged lower against the euro, the British pound and the Japanese yen.
Oil for September delivery rose 71 cents to end at $96.68 a barrel.
Gold futures for December delivery rose $19.90 to settle at $1,642.90 an ounce.
Bonds:The price on the benchmark 10-year U.S. Treasury rose, pushing the yield up to 1.85% from 1.82% late Monday.