Ratings agency Moody's maintained South Africa's Baa1 sovereign debt rating on Thursday, praising a crimp on public spending and the possibility of a negotiated end to mining sector turmoil.
Moody's said Africa's largest economy had shown "renewed commitment to spending restraint" in its last two budget statements, helping reach a government target to steady debt at about 50 percent of output.
"At these levels, South Africa's debt would remain comparable to that of its peers," Moody's said
With the South African economy on the rocks and reform efforts stalled, some had predicted Moody's would issue a downgrade.
Moody's welcomed a tacit agreement between the mining companies, unions and the government this month to stabilise unrest in the economy's key mining sector.
Months of deadly industry-wide strikes in the last year have curbed production.
"Already this year strikes have been of relatively shorter duration, with violence mostly being contained," Moody's said.
But the agency kept its outlook negative because of weak production prospects in mining, the country's single largest employer.
Falling gold and platinum prices have hit the already struggling sector hard.
The continental powerhouse is struggling under high inflation and slow growth which is likely to come in at a lower than expected 2.4 percent this year.
Its central bank was due to announce its latest monetary policy decision on Thursday after holding interest rates steady in May amid the economy's "deteriorating outlook".
South Africa's treasury lauded Moody's verdict as "a sign of confidence in our macroeconomic policy strategies".