Shares of Vodacom, the South African unit of Vodafone Plc, bucked the trend, ending down 0.8 percent after it cautioned second-half growth was likely to slow.
Talk that Italian Prime Minister Silvio Berlusconi could resign, which was subsequently denied, helped lift European shares and sent Johannesburg investors scurrying to close out short positions at the end-of-trade auction.
It was a big short squeeze here, said Devin Shutte, a trader at Newstrading.
The topsy-turvy news flow from the euro zone... (caused) a big push at the auction.
Investors buy back shares to cover, or close out, existing short positions -- bets that the price of a security will decline.
The benchmark Top-40 index finished up 2.2 percent at 29,178.13, marking its highest close in six sessions.
The broad All-share index ended up 1.9 percent at 32,514.38.
Shares of Assore, a miner of base minerals and metals, jumped 5.7 percent to 218 rand, after losing 5.4 percent over the previous five sessions.
Platinum miner Impala Platinum gained 4.3 percent to 184.67 rand.
Gold miners were helped as bullion rose to highest in about six weeks, with Harmony, South Africa's third-largest gold miner, jumping 5.5 percent to 112.00 rand.
Gold Fields, South Africa's second-largest gold miner, rose 4.4 percent to 143.00 rand.
Preliminary trade volume from the Johannesburg Stock Exchange at the close showed a total of 140.5 million shares changing hands, the lowest since April.
Advancers outnumbered decliners by a ratio of nearly 2 to 1.