The S&P 500 fell more than 7 points, or 0.52%, to close at 1399, while the Nasdaq slid 9 points, or 0.30%, to settle at 2968. The loss snapped the tech-heavy index's six-session winning streak.

The weakest sectors in the broad market were energy, basic materials, and consumer cyclicals, while conglomerates, consumer non-cyclicals and utilities were in the green.

Volume totaled 3.31 billion on the Big Board and 1.76 billion on the Nasdaq. Advancers ran ahead of decliners by a 1.3-to-1 ratio on the New York Stock Exchange and a 1.2-to-1 ratio on the Nasdaq.

"An agreement to avert the fiscal cliff before year-end remains our central assumption, though it continues to look like a fairly close call given the political obstacles to a deal," said Goldman Sachs economists in a morning note. "If a deal is reached, we would expect a tax increase of a magnitude similar to the upper income tax cuts, though the composition might differ. Entitlement reforms also seem likely to be part of a package, particularly related to health programs. 'Downpayments' in both areas seem likely, with additional deficit reduction to be enacted in 2013 as part of a two-stage process."

The working deadline for an agreement, according to Goldman, appears to be Dec. 21.

"While talks are ongoing, we would not expect serious negotiations to begin for another couple of weeks. In the interim, headlines out of Washington are likely to be mixed, but we would expect more negative than positive news until at least mid-December," the firm's economists noted.

Organization for Economic Cooperation and Development's Secretary-General Angel Gurría warned Tuesday that the if the United States falls over the fiscal cliff, it could tip an already weak economy into recession, while failure to solve the euro area crisis could lead to a major "financial shock and global downturn."

Meantime, most of Tuesday's economic data was positive. The Census Bureau reported durable goods orders were unchanged in October after a prior downwardly revised gain of 9.2% in September. Excluding the transportation component, orders rose 1.5%, compared with a downwardly revised increase of 1.7% the previous month.

Economists, on average, had expected orders to fall 0.6% in October and decline 0.5%, excluding transportation.

"Overall sales had been hampered by the impact of the recession gripping the eurozone while of course fears over what is on the other side of the fiscal cliff," said Andrew Wilkinson, chief economic strategist at Miller Tabak. "The report appears pretty encouraging given the nature of the rebound in orders outside of the transport sector, while demand for capital goods also surged. The minor downwards revisions will likely be overlooked in the face of strengthening orders in September."

The S&P Case-Shiller 20-city home price index showed a gain of 3% year over year in September after the prior month's rise of 2%. Economists were expecting a 2.9% year-on-year increase in September.

The Federal Housing Finance Agency's September housing price index, meanwhile, rose 0.2% in September after a downwardly revised 0.5% increase in August.

Brian Peery, co-portfolio manager at Hennessy Funds believes that homebuilder and homebuilder supplier-related stocks are an attractive class of assets right now, with the housing market continuing to serve as a bright spot in the stock market.

"We think that the Fed with their QE3 has really been saying to the marketplace that they're focusing on the homebuilders, they're focusing on keeping a low mortgage rate environment and really spurring those first-time homebuyers, and maybe on some people who've done some deferred maintenance on their houses to create a wealth effect by getting the housing prices up and making the consumer feel good again without spending," said Peery.

"We like the mid-cap space because what they tend to be is they tend to be companies that have defensible market positions but they're still small enough that any type of growth in their top-line revenues can be impactful to their bottom line," he added.

Pier 1 Imports ( PIR) and Whirlpool ( WHR) are among his favorite housing market recovery-related stocks. He noted that Pier 1, the specialty retailer of decorative home furnishings and gifts, is an example of a stock that is growing much faster than the overall economy and that Whirlpool will likely continue to do well over the next 18 to 24 months as people continue to install new washers and dryers.

Also, the Conference Board's read on consumer confidence for November indicated an increase to 73.7 from an upwardly revised 73.1. Economists expected the index level to rise to 73.

The FTSE 100 in London advanced 0.22% on Tuesday, while the DAX in Germany settled up 0.55% after Greece's international creditors arrived at a bailout deal for the country.

The deal would finally unlock €34.4 billion in financial aid to Greece, with the agreement that various steps must be taken to make the nation's debt more manageable-- these steps include cutting interest rates on bailout loans to very low levels that could result in losses for creditors, extending the deadlines on loan repayments and Greek bond buybacks.

Japan's Nikkei average closed higher by 0.37%, boosted by the news on Greece and more rhetoric encouraging more intense monetary easing from Japan's opposition leader Shinzo Abe, who is tipped to be the next premier.

Hong Kong's Hang Seng index finished down by 0.08% as investors awaited more clarity on the economic reform plans of China's new leaders.

Gold for December delivery dropped $7.30 to settle at $1,742.30 an ounce at the Comex division of the New York Mercantile Exchange, while January crude oil contracts slipped 56 cents to close at $87.18.

The benchmark 10-year Treasury rose 8/32, to dilute the yield to 1.638%. The dollar jumped 0.31%, according to the U.S. dollar index .

In corporate news, Knight Capital Group ( KCG) shares extended the prior session's gains as it popped by 5.3% following a report from The Wall Street Journal that the firm may sell its market-making business, the company's most profitable unit. The Journal reported that Knight had been approached by at least two competitors about buying the business.

Ralcorp Holdings ( RAH) shares surged 26.4% after the private-brand food products company announced that ConAgra Foods ( CAG) will acquire all outstanding shares of Ralcorp for $90 a share in cash.

Ralcorp on Tuesday also revealed better-than-expected fourth-quarter earnings of 92 cents a share; analysts, on average, were expecting earnings of 87 cents a share. Revenue came in at $1.07 billion, compared with expectations of $1.1 billion. ConAgra shares tacked on 4.7%.

Shares of Green Mountain Coffee Roasters ( GMCR) were soaring more than 20% in extended trades after the company trounced Wall Street's expectations for its fourth-quarter results, reporting a non-GAAP profit of 64 cents a share with net sales rising 33% year-over-year to $946.7 million, well ahead of the consensus view for earnings of 48 cents a share on revenue of $902.7 milion.

The board of Las Vegas Sands ( LVS) declared a special dividend of $2.75 a share after Monday's closing bell. Shares jumped 5.3%.

Dollar General ( DG), the discount retailer, will join the S&P 500, replacing Cooper Industries ( CBE), which is being acquired by Eaton ( ETN).