Stocks ended slightly higher on Tuesday as mergers and acquisitions supported selected sectors, but investors pulled back from recent gains in some big-cap technology and bank shares.

The S&P 500 has risen for eight of the past 11 trading days, but there were signs of fatigue as investors grew cautious in advance of key employment data at the end of the week.

The market is getting a little tired, said Michael James, senior trader at regional investment bank Wedbush Morgan in Los Angeles. The market is a little overbought and I can't say it's completely unexpected to see things take a little bit of a pause.

Fertilizer maker CF Industries Holdings Inc raised its hostile bid for Terra Industries Inc , and Dow Chemical Co said it will sell one of its units to private equity firm Bain Capital Partners.

That helped boost sentiment a day after American Insurance Group announced a record-breaking deal to sell a major Asia insurance unit. More deal-making is a sign that the financial markets are normalizing and the economy improving.

The Dow Jones industrial average <.DJI> gained 2.19 points, or 0.02 percent, to 10,405.98. The Standard & Poor's 500 Index <.SPX> added 2.60 points, or 0.23 percent, to 1,118.31. The Nasdaq Composite Index <.IXIC> rose 7.22 points, or 0.32 percent, to 2,280.79.

In another bright spot, Greece's borrowing costs fell to their lowest level in weeks as its government is expected to announce new austerity measures to win European debt guarantees for the cash-strapped European Union member.

The Dow industrials closed just above breakeven as investors took profit, pushing the blue chip index back into negative territory for the year after it briefly turned positive earlier in the day.

Dow components International Business Machines fell 0.9 percent to $127.42, Hewlett Packard lost 0.8 percent to $51.12, while JPMorgan Chase & Co fell 0.5 percent to $41.62 and Bank of America lost 1.5 percent to $16.46.

In Monday's session both the S&P 500 and the Nasdaq turned positive for the year.

Some recent economic data has been lackluster, with Tuesday's figures on February sales from major U.S. automakers adding to the concerns. Shares in Ford Motor Co fell 1.5 percent to $12.22.

CF Industries Holdings raised its offer to $47.40 per share in cash and stock, sending Terra Industries' shares up 10.9 percent to $45.67. CF shares shed 1 percent to $106.42.

Dow Chemical Co said it would sell its Styron basic plastics unit to Bain Capital Partners for $1.63 billion. Dow shares were up 0.7 percent at $28.88.

On the Nasdaq, technology bellwether Qualcomm Inc , rose more than 6 percent to $37.93 after the company announced a new $3 billion share buyback plan and raised its quarterly dividend by 12 percent.

About 8.41 billion shares traded on the New York Stock Exchange, the American Stock Exchange and Nasdaq, below last year's estimated daily average of 9.65 billion.

Advancing stocks outnumbered declining ones on the NYSE by a ratio of nearly 5 to 2, while on the Nasdaq, about two stocks rose for every one that fell.

(Editing by Kenneth Barry)