An appeal court in South Africa said on Monday that former president Jacob Zuma was unlawfully given medical parole from a jail term last year and should return to prison to complete his sentence.
Zuma, 80, had been handed a 15-month term in June 2021 for contempt of court, a move that triggered deadly unrest.
But he served only two months before being given parole for medical reasons that remain unclear.
Parole was granted by the head of South Africa's prison service, despite an opinion by the service's medical committee that Zuma did not meet the required conditions.
"This court has now determined that Mr Zuma's release on medical parole was unlawful," the supreme court of appeal said.
"Mr Zuma in law has not finished serving this sentence. He must return to the Estcourt Correctional Center to do so," it said, referring to a jail northwest of the city of Durban.
According to medical assessments cited in the appeal court's decision, Zuma has problems linked to high blood pressure, elevated levels of blood sugar and lesions of the colon.
Zuma, a prominent figure in the fight against apartheid, became president in 2009 and was forced to step down in disgrace by the ANC in 2018 following mounting corruption allegations.
But he remains a revered figure among grassroots members of the ruling African National Congress (ANC), who perceive him as a defender of the poor and oppressed.
When his jail term was announced, violent protests broke out that spiralled into looting, leaving 350 people dead.
The order by the supreme court of appeal is unlikely to be the final word in the long-running saga, as Zuma still has recourse to the Constitutional Court, the highest judicial instance in the land.
The prison authorities last month announced that Zuma's 15-month term was now formally over.
He has since made several public appearances, singing and dancing before his supporters, and launched a verbal attack on his successor, Cyril Ramaphosa, accusing him of graft and treason.
Ramaphosa faces a crucial ANC conference next month, seeking re-election at a time when he is under pressure over allegations that he concealed a multi-million-dollar cash heist at his luxury farmhouse.
Zuma was jailed for refusing to testify to a high-level inquiry into massive state corruption that unfolded under his presidency.
He also faces separate corruption charges over an arms deal dating back more than two decades.