A South African court has ruled that the country’s former President Jacob Zuma should be returned to prison, saying his medical parole was “unlawful”.

The Pretoria court says the time Zuma spent out of prison should not be counted in his 15-month sentence.

The High Court ruled that the decision by the head of the correctional service to release the former leader on medical parole was “reviewed, declared unlawful, and set aside”.

Zuma was released on September 5 for an undisclosed medical condition.

He had been jailed for failing to attend an inquiry into corruption during his presidency.

The 79-year-old handed himself in to police in July after a public stand-off, but his unprecedented jailing sparked violent protests and looting.

More than 3-hundred people died in the protests.

Zuma is also facing a separate corruption and fraud trial related to a 2019 arms deal.

Prison authorities say his release on parole was compelled by a medical report, but his ailment has never been disclosed.