TikTok is one of the world’s most popular social media platforms. Photo: Reuters

Senegal has suspended TikTok, saying the video-sharing platform had been used to fan violence sparked by the detention of opposition figure Ousmane Sonko.

Authorities had already cut mobile data access on Monday, with several human rights groups denouncing the measure – as well as the dissolution of Sonko's party.

"The TikTok application is the social network of choice for ill-intentioned people to spread hateful and subversive messages threatening the stability of the country," the minister of communications and the digital economy, Moussa Bocar Thiam, said in a statement on Wednesday.

Unrest erupted after Sonko was charged on Monday with fomenting insurrection, undermining state security, criminal association with a terrorist body, and other crimes.

At least three people have died in the unrest, while two others were killed on Tuesday in a petrol bomb attack on a bus in the outskirts of the capital Dakar.

No clear link has been established between the bus attack and the protests.

Sonko’s party dissolved

Three parked buses were also hit by petrol bombs in the city of Thies on Wednesday, though no casualties were reported.

"The government's decision to dissolve PASTEF violates freedom of expression, association, peaceful assembly, and democratic participation," Human Rights Watch (HRW) said in a statement on Tuesday evening.

It called on authorities to reinstate the party and restore internet.

"The dissolution of a political party is an extremely serious measure, which should only be used as a last resort... in accordance with democratic principles and respect for fundamental rights," the International Federation for Human Rights (FDIH) said in a statement on Wednesday.

Five to 20 years in jail

Amnesty International has also denounced the internet restrictions.

Sonko, who had already been convicted in two other cases, could face between five and 20 years in prison on the fresh charges, according to his lawyers.

His sentencing in absentia to two years in prison in a moral corruption case in June sparked fatal clashes that left at least 16 people dead.