Stocks rallied on Monday as reassuring economic data spurred optimism the recession is abating, overshadowing a long-expected bankruptcy filing by General Motors.

The U.S. manufacturing sector contracted in May but at a slower rate than expected and posted its highest reading since September, while consumer spending fell only slightly in April, offering potential evidence the economic cycle was turning.

U.S. construction spending posted its biggest increase in eight months in April, and rose for the second consecutive month, government data showed.

What this (data) means is things aren't really getting worse, and I guess that is good enough for a rally, said Kim Caughey, senior investment analyst at Fort Pitt Capital Group in Pittsburgh.

What we're going to be looking next is increased (corporate) revenues. Perhaps markets are telling us good times are ahead, but I don't see any clear evidence of that.

The Dow Jones industrial average <.DJI> rose 218.96 points, or 2.58 percent, to 8,719.29. The Standard & Poor's 500 Index <.SPX> gained 26.00, or 2.83 percent, to 945.14. The Nasdaq Composite Index <.IXIC> added 56.28, or 3.17 percent, to 1,830.61.

Major industrials led the rise in the Dow, with shares of airplane manufacturer Boeing Co up 5.6 percent to $47.36. Basic resources also gained, and aluminum producer Alcoa Inc added 8 percent to $9.94.

The S&P 500 rose above its 200-day moving average for the first time since May 2008 on an intraday basis, a key milestone that some analysts took as a harbinger of likely gains ahead. The benchmark index has gained more than 39 percent since the 12-year lows in early March.

General Motors Corp filed for bankruptcy on Monday, eliminating some market uncertainty about the future of the automaker that has received billions of dollars in government money to stay afloat.

More details on how the GM bankruptcy is going to play out will be important in the next days, said Fort Pitt's Caughey.

I'd like to see car company people running GM.

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

Cisco was among the top boosts to the Nasdaq, rising 6.6 percent to $19.72, while Travelers gained 3.6 percent to $42.13. GM shares rose 17.3 percent to 88 cents, and Citigroup fell 0.5 percent to $3.70.

The Dow industrials is at its highest since January 9 and is now up more than 33 percent from a multiyear low in early March.

The latest U.S. economic numbers came after 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 Rodrigo Campos; editing by Jeffrey Benkoe)