U.S. stocks rose on Monday, sending the S&P 500 to its highest close in seven months, as reassuring economic data reinforced hopes that demand will stabilize, while General Motors' long-expected bankruptcy filing ended uncertainty about the automaker's fate.

Data showing that the U.S. manufacturing sector contracted in May at a slower rate than expected fueled hopes the U.S. recession that began in December 2007 is moderating.

Investors were also encouraged by signs of manufacturing stabilization from China, with demand from emerging markets for commodities and other resources seen leading a revival of global growth.

There's a potential for green shoots, said Alan Lancz, president of Alan B. Lancz & Associates Inc, an investment advisory firm based in Toledo, Ohio, referring to signs of economic stabilization. The best news has been the growth in China. Investors are betting on growth stimulus from the emerging markets.

The Dow Jones industrial average <.DJI> shot up 221.11 points, or 2.60 percent, to 8,721.44. The Standard & Poor's 500 Index <.SPX> gained 23.73 points, or 2.58 percent, to 942.87. The Nasdaq Composite Index <.IXIC> jumped 54.35 points, or 3.06 percent, to 1,828.68.

The broad-based advance extended the U.S. stock market's recovery from the 12-year closing low of March 9, with the benchmark S&P 500 now up about 40 percent since then.

The S&P 500's gain on Monday marked its highest close since last November, and the Dow climbed to its highest finish since January. The Nasdaq had its highest close since October 2008.

The S&P 500 hit another crucial milestone, ending above its 200-day moving average for the first time since December 2007, a feat that some analysts took as possibly a harbinger of additional gains ahead.

In Monday's rally, the standouts included shares of big manufacturers such as Boeing Co , which rose 6.4 percent to $47.70, while United Technologies Corp added 5.1 percent to $55.27.

Shares of energy companies also surged, with Chevron Corp up almost 4 percent at $69.21 as front-month U.S. crude oil futures climbed $2.27 to settle at $68.58 a barrel. Exxon Mobil Corp shot up 3.5 percent to $71.76.

Shares of other natural resources companies also gained. Aluminum producer Alcoa Inc added 6.6 percent to $9.83, while miner Freeport-McMoran gained 6.8 percent to $58.12.

As expected, General Motors filed for bankruptcy on Monday, marking an historic fall from grace for a storied American corporation. The filing eliminated some market uncertainty about the future of the automaker that has received billions of dollars in government money to stay afloat.

The Chrysler bankruptcy looks like it's finishing up smoothly and investors are hoping that the same thing is in the cards with the GM situation, Lancz said.

Following the bankruptcy filing, Dow Jones Indexes said GM will be removed from the Dow Jones industrial average and will be replaced by Cisco Systems Inc . Embattled financial company Citigroup Inc will also be deleted from the Dow average and Travelers Cos Inc will take its place.

Cisco, a maker of networking equipment, provided one of the biggest boosts to the Nasdaq, rising 5.4 percent to $19.50, while Travelers gained 3.1 percent to $41.91 on the New York Stock Exchange.

GM shares ended unchanged at 75 cents, a day before their suspension by the NYSE, while Citigroup slipped 0.8 percent to $3.69.

China's manufacturing sector continued to expand moderately in May as new export orders improved, two surveys showed, adding to tentative signs the world's third-largest economy was stabilizing.

(Reporting by Ellis Mnyandu; Editing by Jan Paschal)