South African stocks surged nearly 4 percent on Tuesday, booking their biggest one-day percentage rise in 16 months, as beaten down shares were lifted by renewed optimism that Europe would deal with its debt crisis.

Miners such as Kumba Iron Ore and Exxaro Resources, which were battered in the recent global sell-off, mounted big recoveries as investors returned to riskier assets such as commodities and equities.

We are seeing a bit more optimism that there will be some kind of resolution to the European crisis but we don't have details on that yet, so that still remains a risk for investors, said Devin Schutte, a trader at Newstrading.

The return to riskier assets also helped South Africa's rand, pushing the currency up more than 3 percent during the day.

Johannesburg's Top-40 index of blue chips snapped a four-day losing streak, adding 1,032.26 points to 27,493.63, its biggest one-day percentage gain since May 2010.

The broader All-Share index was 3.5 percent stronger at 30,752.40.

Kumba, Africa's largest producer of iron ore, powered 7.7 percent to 466.69 rand, making it the top percentage gainer on the Top-40 index.

Shares of Kumba have been battered by concerns that a slowdown in the global economy would dampen demand for the steemaking ingredient.

As of Monday's close, it had fallen nearly 11 percent since the end of August.

Diversified miner Exxaro ended 6.5 percent firmer at 186.60 rand, boosted by the broader market rally and also on positive sentiment around its deal to sell its mineral sands businesses to pigment producer Tronox.

Analysts say the deal, announced Monday, is a positive for the company as it will expand Exxaro's geographic reach and give it a stake in one of the world's largest pigment producers.

A total of 197 shares advanced while 79 declined and 76 were unchanged. Total traded volume was 215.7 million shares, according to the latest exchange data available at 1643 GMT.

That would represent a drop from the previous session's 379.4 million shares.