A court on Friday quashed President Cyril Ramaphosa's suspension of South Africa's public protector a day after she launched a probe into a burglary at his farmhouse, calling the move "improper".
The Western Cape High Court said the "hurried nature" of the suspension of Busisiwe Mkhwebane suggested it "may have been retaliatory" and thus unlawful.
"The decision of the applicant to investigate the President ... prompted the President not to wait a day more and to immediately suspend her," the judges wrote.
Rampahosa suspended Mkhwebane in June shortly after she sent him questions over the alleged cover up of a burglary at his farm.
Mkhwebane had been appointed public protector by former president Jacob Zuma in a move widely seen as an attempt to escape from corruption claims.
The public protector is an independent state institution set up to defend democracy and investigate improper conduct.
The court's ruling will pile pressure on Ramphosa who last week was accused by lawmakers of failing to answer questions on the case before parliament.
The judges noted that while the process to suspend Mkhwebane started in March it appeared to have been accelerated by the launch of the farm theft probe.
"When the events ... are objectively examined, it is irresistible to conclude that the decision of the President was improper," the judges wrote, declaring the suspension invalid.
The probe over potential breaches of the executive ethics code was opened after Ramaphosa was accused covering up a 2020 heist at his Phala Phala game farmhouse, in the northeast of the country.
The case stems from a police report filed by former spy boss Arthur Fraser who in June alleged Ramaphosa hid the $4 million cash robbery from authorities, and instead organised the kidnapping and questioning of the robbers, to then bribe them into silence.
The president has acknowledged a burglary but denies kidnapping and bribery, saying he reported the break-in to the police.
He has also disputed the amount of money involved, explaining it came from legitimate sales of game from his animal-breeding farm.
The presidency said in a statement it has noted the high court ruling and "will seek guidance from the Constitution on the next steps".