At 1628 GMT, the rand traded at 17.1350 against the dollar, 0.95% stronger than its previous close as the greenback slipped after hitting a high earlier in the day.

The dollar index, which measures the greenback against a basket of major currencies, briefly hit 110.27, its strongest since June 2002, as the euro tumbled. It later fell back and was trading at 109.810 at 1630 GMT.

Russia's state-controlled Gazprom announced on Friday that the Nord Stream 1 pipeline to Germany would remain closed indefinitely, shocking customers who had expected it to reopen on Saturday after three days of maintenance work.

This spurred concern among investors who rushed to the safety of the greenback, forcing the euro to retreat to a 20-year low and strengthening the dollar.

Shares on the Johannesburg Stock Exchange (JSE) were mostly unmoved in the day as investors ignored global cues and stayed on the fence a day before the country's second-quarter GDP numbers were to be announced.

The benchmark all-share index closed marginally up 0.03% to 67,399 points and the blue-chip index of top 40 companies ended down 0.02% to 60,844 points.

The government's benchmark 2030 bond was down in early deals, with the yield up 5 basis points to 10.330%.

(Reporting by Bhargav Acharya in Bengaluru and Promit Mukherjee in Johannesburg; Editing by Simon Cameron-Moore and Bernadette Baum)