The Treasury said in a statement that government had noted and welcomed S&P’s decision.

“The benefit of this decision is that SA is given more time to demonstrate further concrete implementation of reforms that are underway aimed at achieving higher levels of inclusive growth and place public finances on a sustainable path,” it said.

It said that the rating outcome demonstrated that South Africans could unite, especially during difficult times, to achieve a common mission.

S&P maintained the negative outlook on the rating, citing concern about economic growth and warned it could lower the rating by year-end or next year if policy measures did not turn the economy around.

A downgrade to BB+, or junk would have put SA on a par with Russia, Indonesia, Turkey and Azerbaijan, among others.

Ratings agency Fitch, which also rates the country’s debt at one notch higher than junk, is expected to announce its verdict on June 8, although it may advance this date.

A cut to "junk" status would have made borrowing more expensive for South Africa, making it harder to plug a budget deficit estimated at 3.2% of GDP for the 2016-17 financial year.

Last month Moody's made the unexpected decision to upgrade South Africa's rating to a position two notches above "junk".

However, the agency also maintained a negative outlook, meaning that a cut could come when it next reviewed the situation.

Finance Minister Pravin Gordhan said S&P and Fitch met the Treasury two weeks ago, with S&P also visiting businesses and other stakeholders.

Trading on the country’s markets had been volatile ahead of the announcement.

Last month, the International Monetary Fund cut its 2016 forecast for South Africa to 0.6%, from 0.7%. The economy expanded by 1.3% in 2015.

Rand Strengthened

The Rand strengthened substantially against the dollar in late trade on Friday after ratings agency Standard and Poor’s affirmed SA’s credit rating at BBB- with the outlook remaining negative.

At 5.51pm‚ the rand was trading at R15.1392 to the dollar from R15.5739 at the previous close. It was at R17.1305 against the euro from R17.3675 previously‚ and at R21.9643 against the pound from R22.4708 previously.