A court in Senegal has ordered that jailed opposition leader and presidential aspirant Ousmane Sonko be reinstated on the electoral register.
A government lawyer said it would appeal against the ruling, renewing doubts on whether he will be able to run for president in elections due in February.
He was struck off the electoral roll after being sentenced in June to two years' imprisonment for "morally corrupting" a young person.
The charges stemmed from allegations made by a massage therapist.
He has denied any wrongdoing.
In July, he was charged with insurrection and endangering state security but is yet to be tried.
He has repeatedly maintained that the cases are politically motivated to prevent him from contesting the election.