S&P upgraded its outlook from "stable" and affirmed the "BB-/B" foreign currency as well as "BB/B" local currency ratings on South Africa.

"Recent favourable terms of trade in South Africa have improved the external and fiscal trajectory, while the country's reasonably large net external asset position, flexible currency and deep domestic capital markets provide strong buffers against shifts in external financing," S&P said in its report.

S&P said it expects South Africa's fiscal deficit to remain elevated, but gradually narrow to 5% of GDP by fiscal 2025.

The economic growth of Africa's most industrialised country is expected to slow to 1.7% this year, according to the central bank's forecast on Thursday, from a 4.9% expansion last year, as it recovers from a contraction in the wake of the COVID-19 pandemic.

(Reporting by Ahmed Farhatha in Bengaluru and Olivia Kumwenda-Mtambo in Johannesburg; Editing by Amy Caren Daniel)