For years, Ace Magashule was one of South Africa’s most powerful politicians, a populist firebrand whose name was synonymous with the ruling African National Congress.

But now, the former ANC secretary-general is suing the party that has governed South Africa for 27 years, after it suspended him for refusing to step down over an investigation into allegations of corruption.

“Nobody will remove the ANC from me . . . I won’t leave the ANC and I [will] die in the ANC,” Magashule, who denies wrongdoing, said this month at a rally for former president Jacob Zuma. Zuma was appearing in court in a long-running corruption case. Magashule’s own trial is scheduled for August, months before the ANC contests local polls set for October.

Senior ANC officials have condemned Magashule’s “unbecoming, divisive and defiant” behaviour. “He has been charged in a criminal court for fraud, corruption and money laundering and should lead by example and step aside as [other] members of the ANC have done,” Jessie Duarte, Magashule’s former deputy, said in court papers opposing his lawsuit this week.

The battle over Magashule’s fate represents a broader struggle for the soul of the party led by president Cyril Ramaphosa, who is eager to close a door on his predecessor’s legacy of misrule. At stake is not only competing visions of how to resurrect South Africa’s post-pandemic economy, but also attitudes to post-apartheid institutions battered under Zuma’s rule. Zuma’s presidency was marked by a scandal over so-called “state capture”, or the systematic looting of public resources.

Magashule and Ramaphosa represent opposing wings of the party. Magashule’s allies are known for their attacks on the judiciary, while lawyer turned tycoon Ramaphosa wants to temper the party’s radicals. “The divisions are so unbridgeable. It’s either him or Ramaphosa,” said William Gumede, chair of Democracy Works, a civic foundation.

For the first time since the president took office in 2018, “there is a sense that Ramaphosa is finally getting into gear, that even the corrupt are starting to get afraid,” Gumede said. If even the ANC’s most senior officials can be suspended, it sends a signal “down the chain” to looters of broken ANC-governed municipalities at the grassroots level, he added. Dozens more party members are reportedly being asked to step aside under the rules being applied to Magashule.

Magashule’s attempts at fighting back have also misfired. He sought to suspend Ramaphosa as ANC president and as a result faces possible additional disciplinary charges within the party. While Magashule has sought to style himself as a master tactician, a social media picture of him posing over a chess board, pawn in hand, was mocked by Garry Kasparov, the Russian chess grandmaster, as a “photo-op opening”.

“Ace is becoming isolated even among the anti-Ramaphosas,” said Dr Ralph Mathekga, a political analyst. More and more old allies of Magashule and Zuma are considering their future careers under Ramaphosa, he said. But this realignment does not signal a deeper tackling of the party’s reliance on patronage politics, he added.

Outside of the twists and turns of Magashule’s fight with Ramaphosa, South Africa’s newspapers have in recent weeks been filled with scandals over ANC links to allegedly rigged public tenders, on everything from pandemic funds to emergency power procurement. “The model doesn’t really change,” Mathekga said.

Magashule’s own lawsuit against his suspension paints a picture of party elites hungering for power whatever their faction. “The real motive behind my being purged is the desire to remove me, by hook or by crook, from the all-powerful position of [secretary-general], so that the road to the re-election of president Cyril Ramaphosa and his faction . . . is made easier,” he said.

These messages are about sowing unrest among the party’s rank and file rather than winning in court, analysts said. Ramaphosa is up for re-election as party leader at the end of next year. While he has strong support in the ANC’s national executive committee, a group of around 80 senior officials, and its caucus of lawmakers, he has less support among grassroots party branches.

Magashule’s long-shot hope is to convince members to hold an early special vote to unseat Ramaphosa, although this is unlikely, analysts said. Magashule’s “best bet” is to attempt these manoeuvres within the party rather than to break away, Mathekga said.

As one of Africa’s oldest political parties, the ANC has weathered many splits. But without access to the party’s brand and grip on state resources, they have mostly ended in electoral oblivion. Only one, the Economic Freedom Fighters, made up of leftist exiles of the ANC’s youth wing, has ever secured more than a million votes in a general election. The EFF won over 10 per cent of the 17.4m votes cast in the last national poll in 2019.

The ANC won just over 57 per cent of the vote in 2019, with a low turnout. A smaller ANC and a smaller vote base favours breakaways in the long run, as does the festering post-pandemic economic crisis, Gumede said. “People are angry and disgruntled . . . the base of the ANC are absolutely struggling.”