The Dow and S&P 500 advanced to their highest levels since June 2008 on Monday as a flurry of merger news and solid earnings sparked broad gains.

Buying accelerated after the S&P 500 broke through the high end of its recent range, suggesting Wall Street has the strength to move the market higher. Almost three stocks rose for every one that fell on the New York Stock Exchange.

A lot of analysts are saying that we need a correction before we can move higher, but I think there's still room to grow, said Ron Kiddoo, chief investment officer at Cozad Asset Management in Champaign, Illinois, which has $700 million in assets under management.

Diversified industrial company Danaher Corp agreed to buy medical diagnostics company Beckman Coulter Inc for about $6.8 billion. Oil driller EnsCo Plc said it would buy Pride International Inc
for about $7.3 billion.

Danaher Corp rose 2.9 percent to $49.38 while Beckman Coulter gained 9.8 percent to $82.50. EnsCo fell 4.6 percent to $51.92 while Pride International rose 16 percent to $39.91.

The Dow Jones industrial average <.DJI> was up 77.99 points, or 0.64 percent, at 12,170.14. The Standard & Poor's 500 Index <.SPX> was up 9.88 points, or 0.75 percent, at 1,320.75. The Nasdaq Composite Index <.IXIC> was up 21.26 points, or 0.77 percent, at 2,790.56.

Loews Corp reported its best quarter of the year, posting a better-than-expected 16 percent jump in profit. The conglomerate's stock gained 4.1 percent to $43.10.

About 72 percent of S&P 500 companies that have reported results so far posted stronger-than-expected earnings, according to Thomson Reuters data. Investors expect aggregate earnings rose 37 percent in the last quarter, the highest estimate for that period in more than 10 months.

People thought the number of companies beating on both the top and bottom line might slow, but it doesn't appear to be, Kiddoo said. With the earnings and the M&A, which is a sign companies are undervalued, there's really no bad news today.

UBS raised its 2011 target for the S&P 500 index by 7.5 percent to 1,425 from 1,325, citing an improving outlook for the economy and earnings.

Struggling U.S. Internet company AOL Inc has agreed to buy The Huffington Post, the rapidly growing news, analysis and lifestyle website, for $315 million. AOL shares fell 2.6 percent to $21.38.

Adding to Wall Street's image problem, Nasdaq OMX Group said on Saturday that computer hackers had infiltrated the operator of the Nasdaq Stock Exchange.

Hacking is going to be a global problem and like a war breaking out, it is hard to hedge against it. There will be concerns, but it's not going to have an impact on how investors see opportunities for the stock market, said Joe Battipaglia, market strategist at a private client group for Stifel Nicolaus in Philadelphia.

(Reporting by Ryan Vlastelica; Editing by Kenneth Barry)