South Africans protest President Jacob Zuma's cabinet reshuffle outside Parliament in Cape Town on Friday. (Nic Bothma/European Pressphoto Agency)

South African President Jacob Zuma faced heavy ­criticism after replacing his influential finance minister and nine other ministers Friday, a purge that many saw as an attempt by the beleaguered leader to consolidate his authority amid a wave of scandals and power struggles.

Zuma’s cabinet reshuffle underscores the growing fragility of the once-celebrated African National Congress (ANC), the party that Nelson Mandela led during the fight against apartheid. Since being elected in 2009, Zuma has presided over the unraveling of the party, which has performed poorly in municipal elections and been beset by internal divisions.

By dismissing Finance Minister Pravin Gordhan, a respected political veteran who was attempting to salvage investor confidence in the country, Zuma invited criticism from some of his closest ­allies. Even his deputy president, Cyril Ramaphosa, called the move “totally, totally unacceptable.” The South African rand promptly fell by more than 2 percent, bringing its decline over the past week — when signs of the coming upheaval became apparent — to 7 percent.

Zuma said the changes were meant “to improve efficiency and effectiveness.”

Critics of Zuma say he has long wanted to replace Gordhan with someone who might be more ­pliant in heading the treasury and have voiced concern that the change might exacerbate corruption. Gordhan seemed to refer to such fears in his remarks after being fired.

“We hope more and more South Africans will make it absolutely clear that our country is not for sale,” he said.

Last year, South Africa’s top court ruled that Zuma had violated his oath of office by not repaying public funds used for upgrades at his private home.

In the past, even during times of controversy, the ANC has maintained a united front, giving many South Africans the impression that it was impervious to criticism. Now, fractures are clearly visible.

Gwede Mantashe, the party’s secretary general, told Talk Radio 702 that the process leading to the cabinet reshuffle had made him “jittery and uncomfortable.”

Gordhan was replaced by ­Malusi Gigaba, the home affairs minister, who has limited financial ­experience.

“This is an attack on the institution of the Treasury and as such will trigger multiple downgrades,” Peter Attard Montalto, a research analyst at the investment firm Nomura, wrote in the Mail and Guardian.

Zuma’s term is due to end in 2019, but the party’s unpopularity extends beyond his leadership. During municipal elections last year, the ANC lost some of its historic strongholds, including Nelson Mandela Bay.