The Constitutional Court in Ivory Coast has barred the former president, Laurent Gbagbo, and former prime minister, Guillaume Soro, from running in the presidential election next month.
The electoral commission had already said that anyone with a criminal record would be disqualified.
Both men have convictions.
Earlier, protests broke out in several cities over President Alassane Ouattara’s decision to run for a third term, something the Ivorian constitution prohibits.
Fifteen people have died in violence since he said last month that he would stand again.
He took the decision after his hand-picked successor died suddenly in July.