The Dow industrials and the S&P rose modestly while the Nasdaq dipped in choppy trade on Monday as gains by the energy and banking sectors were offset by a drop in pharmaceuticals after Merck's proposed $41 billion takeover of Schering-Plough .

Even though news of the takeover spurred optimism about deal activity, investors worried that it underscored the broad reach of the recession, hurting even defensive sectors such as pharmaceuticals.

This deal was done in a declining environment for both companies, said Arthur Hogan, chief market analyst at Jefferies & Co in Boston. It will continue to spur conversation about other M&A activity in the pharma space.

Pharmaceuticals represented the top sector drag on the Dow industrials, with Merck down 10.5 percent at $20.35, Johnson & Johnson off 2 percent at $47.03 and Pfizer
down 0.2 percent at $12.71. But Schering-Plough shares shot up 14.2 percent to $20.13.

But a jump of more than 4 percent, or $2.18, in U.S. oil futures to $47.70 a barrel drove up the shares of energy companies. Exxon Mobil , gained 2 percent to $65.29, making it the Dow's top advancer.

An S&P index of energy stocks <.GSPE> gained 2.6 percent.

The Dow Jones industrial average <.DJI> rose 23.33 points, or 0.35 percent, to 6,650.27. The Standard & Poor's 500 Index <.SPX> gained 4.26 points, or 0.62 percent, to 687.64. The Nasdaq Composite Index <.IXIC> slipped 1.92 points, or 0.15 percent, to 1,291.93.

Google's stock fell 3.6 percent to $297.46, making it the top drag on the Nasdaq.

Financial stocks also stood out, rising as investors bet on possibly more clarity from Washington on plans to shore up the banking system. U.S. Federal Reserve Chairman Ben Bernanke was attending a Monday morning meeting on the economy with President Barack Obama, the White House said.

Shares of Bank of America surged nearly 18 percent to $3.70 and Wells Fargo & Co jumped almost 23 percent to $10.60. An S&P financial index <.GSPF> was up 4.4 percent.

(Additional reporting by Ellis Mnyandu; Editing by Jan Paschal)