S.Africa stocks extend losses as rand turns course

* Rand gains over 1 percent

* Investors buy oversold mining firms

By Helen Nyambura-Mwaura

JOHANNESBURG, Oct 9 (Reuters) - South African stocks extended losses on Tuesday as a slightly firmer local currency

helped reverse the gains made by so-called rand hedges like British American Tobacco .

South African Breweries -- to which many investors also fled in the previous session as the rand weakened -- unwound over 3 percent to 374.33 rand.

The rand firmed over 1 percent on Tuesday - although it is still languishing near a 3-1/2 year low - weighed down by weeks of illegal strikes that have hit the mining sector, a key source of foreign exchange for Africa's biggest economy.

"The stronger rand is causing the rand hedges to come off a little bit, that's why the market is negative," said Malcolm Moller, an equities trader at Vunani Securities.

"Rand hedges" refers to Johannesburg-listed shares of companies that reap the bulk of their revenue outside of South Africa, making them less sensitive to weakness in the currency.

The Top 40 index shaved off 0.76 percent to 31,940.31 and the All-Share index lost 0.73 percent to 36,070.74.

"The problem with the rand is the strikes we have got in South Africa, if they can solve those over the next two days, then you will see the rand grow stronger and the market will come off more. If not, and the rand goes weaker, you'll see the rand hedges going up again," Moller said.

British American Tobacco lost nearly 4 percent to 450.59 rand while Swiss luxury goods maker Richemont lost 1.7 percent to 53.69 rand.

Some mining firms went against the grain with investors betting the sector had been punished enough by more than two months of illegal strikes that are hurting mineral production.

"It has been over a decade since we have seen resources valued at these levels," said Andrew Dittberner, Senior Investment Manager at Cannon Asset Managers.

"Although the short-term outlook for resources may be clouded by the current labour unrest, the struggling developed world and concerns around a Chinese slowdown, we believe that there are some opportunities opening up for investors in this sector."

Kumba Iron Ore and African Rainbow Resources

added over 3 percent each to 509 and 165.50 rand respectively. Diversified miner Exxaro was up 2.3 percent to 162.85 rand.

Ellies racked up 3.8 percent gains to 7.07 rand after the maker of power generator and electronic equipment flagged first-half profit would nearly double.

A system error prevented some market participants from receiving price data for part of the trading day.

Only 100 companies gained and another 159 fell as over 113 million shares changed hands.

(Additional reporting by Tiisetso Motsoeneng; editing by David Dolan)

((helen.nyambura@thomsonreuters.com)(+27 11 775 3034)(Reuters Messaging: helen.nyambura.thomsonreuters.com@reuters.net))