Stocks climbed on Monday as China's vow to allow a flexible yuan invigorated optimism in the global recovery and raised the outlook for sales in the long term at U.S. multinationals.

Energy and materials shares led the way up as commodities were boosted by the move. Among U.S.-based multinational companies, Caterpillar Inc gained 3 percent to $67.84, while Freeport-McMoRan Copper & Gold Inc jumped 5.2 percent to $69.30.

China's yuan surged the most since its revaluation in 2005, and global markets gained following the surprise weekend announcement by China's central bank that it would allow greater flexibility for the currency.

The move is expected to boost purchasing power and demand in China, the world's third largest economy. A higher yuan would also help temper inflation by pushing down import prices, which could mean Beijing would have less need to tighten monetary policy aggressively.

It's a very large positive in the sense that the next decade of global growth is probably going to be shaped by how well the China consumer develops or doesn't, and obviously this is a step to help that, said Mike O'Rourke, chief market strategist at BTIG LLC in New York.

The Dow Jones industrial average <.DJI> gained 137.32 points, or 1.31 percent, to 10,587.96. The Standard & Poor's 500 Index <.SPX> rose 13.23 points, or 1.18 percent, to 1,130.74. The Nasdaq Composite Index <.IXIC> climbed 28.40 points, or 1.23 percent, to 2,338.20.

The S&P 500 broke through 1,130, the midpoint between its 2010 high- and low-points and a key technical retracement. But the index could face resistance moving much above it.

An internal BP Plc document released by a U.S. lawmaker estimated that a worst-case scenario rate for the Gulf of Mexico oil spill could be about 100,000 barrels per day, far higher than the current U.S. government figure. BP's U.S.-listed shares slid 3.7 percent to $30.59.

(Editing by Padraic Cassidy)