* All-share index up 0.88 percent at 36,588.67
* Top-40 index down 1.11 percent at 32,361.91
JOHANNESBURG, Oct 5 (Reuters) - South African stocks set a record high on Friday with mining shares among the top performers as investors chased bargains in the sector battered in recent days by a wave of wildcat strikes.
A weaker rand, higher metal prices and an upbeat tone in global markets after data showed a surprise drop in the U.S. jobless rate added to the bullish sentiment. Mining companies benefit from a weaker rand because they sell commodities for dollars but pay most costs in rand.
The South African rand extended losses against the dollar to 2 percent on an escalating labour crisis that has dented investor confidence.
"The rand has weakened quite a lot in recent days and that makes South African stocks cheaper for foreign investors," Paul Chakaduka, a trader at Global Trader, said.
"There's a bit of caution around mining shares but a lot people feel that these stocks have become cheap."
Mining stocks have been hit in recent sessions by wildcat strikes that have cut output and raised fears of expensive wage deals in the sector responsible for about 6 percent of gross domestic product.
The JSE Top-40 index gained 1.11 percent to 32,361.91. It earlier set a record of 32,471.32. The broader All-share index added 0.88 percent to 36,588.67, after notching a record of 36,693.75.
Anglo American Platinum picked up 0.95 percent to 398 rand. It was up as much as 3 percent after the world's top platinum producer said it fired 12,000 workers at its wildcat strike-hit Rustenburg mines.
Gold shares also climbed as the price of the precious metal steadied around its highest level in 11 months. AngloGold Ashanti jumped 4.06 percent to 296.17 rand and rival Gold Fields was 2.81 percent stronger at 107.50 rand.
Both companies said on Thursday they had agreed to reopen wage talks for entry-level workers, a sign they may be moving closer to resolving costly strikes.
Also hit by a two-week strike for higher pay by truck drivers, logistics group Imperial Holdings lost 1.12 percent to 176.02 rand, extending declines to a second day.
Pick n Pay plunged 6.46 percent to 43.85 rand after the country's second-biggest food retailer warned that first-half profit likely fell by up to 40 percent.
A total 160 million shares changed hands, with 157 companies gaining ground and another 134 losing value while 59 shares remained unchanged.
(Reporting by Tiisetso Motsoeneng; Editing by Jon Herskovitz)
((email@example.com)(+27 11 775 3122)(Reuters Messaging: firstname.lastname@example.org))
Keywords: SAFRICA STOCKS/