A Senegalese judge charged opposition leader Ousmane Sonko with rape and freed him from detention pending an investigation on Monday, after his arrest last week sparked the West African state's worst unrest in years.
The judge in the capital Dakar freed the opposition leader from detention but also formally charged him with rape, and the police investigation into the allegation is set to continue.
Sonko calls the rape allegation politically motivated.
Police arrested the 46-year-old for public disorder on Wednesday after scuffles between his supporters and security forces broke out.
Sonko's legal troubles emerged in February when an employee at a beauty salon where he received massages filed a rape accusation against him.
The opposition leader accused President Macky Sall of engineering the complaint in order to sideline him from politics. Sall denies the claim.