SHANGHAI  China announced a huge economic stimulus plan on Sunday aimed at bolstering its weakening economy, a sweeping move that could also help fight the effects of the global slowdown.

At a time when major infrastructure projects are being put off around the world, China said it would spend an estimated $586 billion over the next two years  roughly 7 percent of its gross domestic product each year  to construct new railways, subways and airports and to rebuild communities devastated by an earthquake in the southwest in May.

The package, announced Sunday evening by the State Council, or cabinet, is the largest economic stimulus effort ever undertaken by the Chinese government.

“Over the past two months, the global financial crisis has been intensifying daily,” the State Council said in a statement. “In expanding investment, we must be fast and heavy-handed.”