U.S. stocks advanced on Tuesday, led by gains from oil and materials companies, while an uptick in M&A activity spurred recovery hopes, making equities more appealing to investors.

Energy shares led the S&P 500 index higher as oil futures rose 4.8 percent to $71.30 a barrel thanks to a weak dollar.

Kraft Foods Inc , North America's biggest food company, said it was intent on pursuing Britain's Cadbury despite the confectionary company's rejection of a $16.7 billion Kraft bid made on Monday.

The news of the rebuff sent Kraft shares down 5.9 percent to $26.45, but speculation about potential suitors for Cadbury buoyed the overall market sentiment. For details, see

The M&A news was very supportive to the market, said Bruce Bittles, chief investment strategist at Robert W. Baird & Co in Nashville, Tennessee.

Ever since the market's big rally, a lot of folks have been concerned about valuations. But when you see a bid like this, it eases those fears.

The Dow Jones industrial average <.DJI> was up 40.81 points, or 0.43 percent, at 9,482.08. The Standard & Poor's 500 Index <.SPX> gained 7.27 points, or 0.72 percent, at 1,023.67. The Nasdaq Composite Index <.IXIC> rose 11.74 points, or 0.58 percent, at 2,030.52.

The Kraft bid comes after France Telecom and Deutsche Telekom announced plans to merge their British mobile units and after Walt Disney Co's deal last week to buy Marvel Entertainment Inc for $4 billion.

Although Kraft's stock fell, other food companies rose, including Hershey Co , which added 1.3 percent to $39.14. Some analysts pointed to the possibility of Hershey and Nestle making a joint bid for Cadbury.

In the oil sector, Chevron Corp rose 2.3 percent to $70.53 and provided the top boost to the Dow, while the S&P index of energy companies <.GSPE> was up 2.5 percent.

Freeport-McMoRan Copper & Gold Inc gained 3.2 percent to $68.09 as spot gold rose above $1,000 an ounce to its highest since March 2008 on a wave of technical momentum and dollar weakness before paring gains to $997.

Health insurance stocks <.HMO> slid 1.5 percent before U.S. President Barack Obama's address to Congress on Wednesday. He is expected to outline his proposed revamp of the healthcare system.

Shares of General Electric Co advanced 4.6 percent to $14.51 after J.P. Morgan Securities upgraded the stock, saying it was one of the last equities for which a little good news could still go a long way.

On the Nasdaq, shares of iPod maker Apple Inc rose 2.2 percent to $172.50 after Morgan Stanley raised its price target to $200 from $195. The Morgan Stanley also raised the U.S. systems and PC hardware sector to attractive from in line.

(Editing by Kenneth Barry)