The S&P 500 climbed to a fresh two-year intraday high on Tuesday as investors bet a deal to extend tax breaks will prompt increased spending and buoy the economy while preserving returns for shareholders.

However, stocks eased off session highs as several high-ranking Democrats gave a lukewarm reception to the deal, which still needs the backing of Congress to become law.

It has become clear today that some of the more strident voices on the left are unwilling to make certain compromises necessary to get this passed, said Peter Kenny, managing director at Knight Equity Markets in Jersey City, New Jersey.

Investors said tax cuts are necessary to keep the fragile recovery on track and could lead to more spending and investing. Increasing capital gains and dividends taxes would hurt shareholder returns.

The Dow Jones select dividend index <.DJDVY>, which measures the performance of top dividend-paying companies, rose 0.7 percent. AT&T Inc, which has a dividend yield of 5.9 percent, according to Reuters data, rose 1.2 percent. The deal was expected to extend breaks on dividends and capital gains.

The Dow Jones industrial average <.DJI> gained 44.76 points, or 0.39 percent, to 11,406.95. The Standard & Poor's 500 Index <.SPX> rose 6.17 points, or 0.50 percent, to 1,229.29. The Nasdaq Composite Index <.IXIC> added 15.98 points, or 0.62 percent, to 2,610.90.

U.S. President Barack Obama forged the deal with Republicans to renew Bush-era tax cuts for wealthier Americans as well as the middle class.

Optimism over the agreement sent the S&P 500 to a new two-year high. But the index fluctuated at around the 61.8 percent Fibonacci retracement of the 2007-2009 bear market slide, a technical level closely followed by traders.

U.S. House of Representatives Majority Leader Steny Hoyer said he was undecided on whether to back the deal, while House Speaker Nancy Pelosi said talks with the president were continuing.

There should be no hesitation on the part of the market that from an investor's perspective, tax cuts are always an unambiguously good thing, said Kevin Caron, market strategist at Stifel, Nicolaus & Co in Florham Park, New Jersey.

I would just hope it passes. I think the likelihood is that it will ... maybe 75 percent probability that it will, said Martin Sass, veteran money manager and founder of M.D. Sass, a $7.5 billion firm based in New York. He spoke at the Reuters 2011 Investment Outlook Summit.

The U.S. government sold its remaining stake in Citigroup Inc , a move that could lift the S&P 500 as the company moves to a 100 percent float, according to Credit Suisse.

Credit Suisse estimated that portfolios following the S&P may need to buy up to 375 million Citigroup shares, although the timing of the purchases was uncertain. Citigroup rose 3.7 percent to $4.62.

Many top dividend-rich shares outperformed the wider market, with Chevron Corp up 1.3 percent to $86.06 and AT&T Inc adding 1.1 percent to $28.60.

Some investors feared a higher tax on dividends could reduce the attractiveness of such stocks compared to fixed-income assets, while higher capital gains could spur equity selling at the end of the year to take advantage of the better rate.

3M Co shares fell 2.9 percent to $84.37. The Dow component forecast 2011 profit that could top expectations but issued an outlook for sales growth that was lower than some analysts expected.

In other corporate news, natural gas distributor Nicor Inc climbed 5 percent to $49.09 after rival AGL Resources Inc agreed to buy it. AGL shed 4.7 percent to $35.37.

Women's clothing retailer Talbots Inc said it might report a fourth-quarter loss from continuing operations and that holiday sales could fall, sending its shares down 20 percent to $9.10.

(Reporting by Edward Krudy; additional reporting by Chuck Mikolajczak; editing by Jeffrey Benkoe)