Appeal judges at the International Criminal Court (ICC) in The Hague have rejected a request by ex-Ivorian leader Laurent Gbagbo for temporary release on health grounds.
The 70-year-old denies charges of murder, rape, attempted murder and persecution in the wake of disputed presidential polls in 2010.
Some 3,000 people were killed in unrest after he refused to accept defeat.
He was arrested in April 2011 and his trial is due to start on 10 November.
Mr Gbagbo ruled Ivory Coast from 2000 until his arrest by forces loyal to President Alassane Ouattara, backed by UN and French troops. He was transferred to The Hague in November 2011.
According to the Reuters news agency, court documents say Mr Gbagbo suffers from post-traumatic stress disorder and an unspecified physical ailment.
“The appeals chamber found that it was not unreasonable for the trial chamber to find the existence of Mr Gbagbo’s support network posed a risk to abscond or obstruct investigation,” Reuters quotes Tuesday’s ICC ruling as saying.
Mr Gbagbo is the first former head of state to be detained by the ICC, although Slobodan Milosevic of Yugoslavia and Liberia’s Charles Taylor were tried by special courts in The Hague.
His wife, Simone Gbagbo, is serving a 20-year jail term in Ivory Coast for her role in the violence that followed her husband’s defeat in the presidential run-off.
The ICC’s request to transfer her to The Hague to be tried for crimes against humanity has been rejected by the Ivorian government.