Senegal's detained opposition leader, Ousmane Sonko, has appeared in court in the capital Dakar, on rape charges that his supporters say are politically motivated.
Demonstrators scuffled with security forces at the courthouse as Mr Sonko - who was arrested on Wednesday for disturbing public order - was led into the building.
Police have deployed armoured cars in the city in the wake of several days of clashes in which five people were killed.
Mr Sonko is popular among young Senegalese, and an opposition collective known as the Movement for the Defence of Democracy has called for three days of mass protests.
The UN, foreign embassies and Senegal's neighbours have appealed for all sides to show restraint, schools in the capital have been ordered to close for a week.