A South African court on Friday overturned President Jacob Zuma's appointment of the head of public prosecutions, dealing a sharp reprimand to the scandal-tainted leader.
Shaun Abrahams, who was in 2015 named by Zuma as director of public prosecutions, has often been criticised for allegedly protecting Zuma and his associates.
The High Court in Pretoria ordered Deputy President Cyril Ramaphosa to name Abrahams' successor within 60 days, stating that Zuma was "conflicted" over the issue as he faces possible reinstatement of criminal charges.
"The appointment of Shaun Abrahams as National Director of Public Prosecutions is declared null and void," said judge Dunstan Mlambo.
The court ruling comes as Abrahams was expected to announce his decision on whether to proceed with Zuma's prosecution on fraud and corruption charges.
A court recently ruled against prosecutors' previous decision to drop the charges in 2009, months before Zuma became president.
Zuma's criminal charges relate to multi-billion dollar arms procurement deals by the government in the late 1990s, where he is accused of having received bribes.
Civil society groups had launched a court application questioning Abrahams' fitness to hold office after he brought criminal charges against former finance minister Pravin Gordhan.
Gordhan and his former colleagues were accused of running a "rogue" tax unit that spied on top government officials while he was in charge of the revenue service.
The allegations were later found to be false.
A statement from Zuma's office said he would appeal the decision to rescind Abrahams' appointment.