Johannesburg has secured a vote of confidence from Moody’s Ratings despite mounting financial pressures that have raised concerns over the finances of South Africa’s largest city and economic hub.

The ratings agency affirmed Johannesburg’s long-term issuer rating at Ba3 while revising its outlook to positive, ending a review that had previously placed the municipality at risk of a downgrade.

The decision comes even as the city battles an unfunded budget shortfall of R2.1 billion ($117 million) for the current financial year, mounting debts to state-owned utilities and the possibility of losing R8 billion ($447 million) in national funding over a disputed wage agreement.

Moody’s said Johannesburg’s rating reflects a balance between the city’s resilient economic base, broadly stable operating performance and moderate debt burden, offset by weaker governance and funding challenges.

“The confirmation of the City of Johannesburg’s ratings reflects a balance between its solid financial and economic fundamentals, with broadly stable operating performance, and a moderate debt burden, offset by weaker governance and funding credit challenges,” the agency said.