International Criminal Court (ICC) appeals judges have ordered a review into whether Laurent Gbagbo, the former Ivory Coast president, should be released from detention while his long-running trial continues on crimes-against-humanity charges.
Presiding Judge Piotr Hofmanski on Wednesday struck down a decision by trial judges denying the 72-year-old Gbagbo interim release.
Gbagbo has been in The Hague-based ICC's detention unit since late 2011 and will remain jailed pending the review.
Both Gbagbo and his former militia leader Charles Ble Goude, 45, have pleaded not guilty to four charges of crimes against humanity including murder, rape, and persecution in five months of bloodshed that wracked the Ivory Coast.
About 3,000 people died in the violence.
Prosecutors accuse Gbagbo of engineering the violence to stay in office after losing a runoff to current President Alassane Ouattara.
The trial opened in January 2016 and could last three to four years.
The appeals court said the trial judges had failed to take into account Gbagbo's advanced age, his health, and the fact that he has been in detention since he was handed to the ICC in November 2011.
"The trial chamber should have considered the duration of time Mr Gbagbo has spent in detention ... and whether Mr Gbagbo's detention continues to be reasonable," said Hofmanski, reading a summary of the ruling.
Directing trial judges to carry out a new review, Hofmanski stressed that the appeals court was "not suggesting what the outcome of the trial chambers review should be".
Gbagbo is the first ex-head of state to be tried by the ICC.