At 1646 GMT, the rand traded at 18.0700 against the dollar, 0.63% weaker than its previous close.

South Africa recorded a trade surplus of 7.18 billion rand ($397.34 million) in August, down from a 24.81 billion rand surplus in July, data from the revenue service showed.

On a month-on-month basis, imports were up 10.4%, while exports dropped 1%.

"The weakness in the country's exports reflects the deterioration in global demand conditions and softer prices for key export commodities," analysts at Nedbank said in a research note.

The dollar index, which measures the safe-haven currency against a basket of rivals, was last up 0.47% at 112.33.

Stocks on the Johannesburg Stock Exchange rose, with the Top-40 index closing 0.82% higher and the broader all-share index ending up 0.73%.

The government's benchmark 2030 bond was higher, with the yield down 5 basis points to 10.885%.

($1 = 18.0702 rand)

(Reporting by Anait Miridzhanian in Johannesburg and Bhargav Acharya in Bengaluru; Editing by Jan Harvey and Ken Ferris)