U.S. stocks 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.

Investors have said the tax cuts were 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.

U.S. President Barack Obama forged a deal with Republicans to renew Bush-era tax cuts for wealthier Americans as well as the middle class. The deal was expected to extend breaks on dividends and capital gains.

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

The Dow Jones select dividend index <.DJDVY>, which measures top dividend-paying companies, rose 0.6 percent.

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.

The Dow Jones industrial average <.DJI> gained 49.61 points, or 0.44 percent, to 11,411.80. 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.75 points, or 0.61 percent, to 2,610.67.

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.61.

Many top dividend-rich shares outperformed the wider market, with Dow Chemical Co up 1.1 percent to $33.89 and AT&T Inc adding 0.9 percent to $28.56.

Some investors have feared a higher dividend tax could reduce the attractiveness of such stocks compared to fixed-income assets.

Nicor Inc climbed 4.9 percent to $49.05 after natural gas distributor AGL Resources Inc agreed to buy Nicor, a peer. AGL shed 5 percent to $35.25.

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