Senegalese opposition leader Ousmane Sonko on Tuesday called for mass protests as the country braced for the outcome of his trial on rape charges.

Escalating a tug-of-war with President Macky Sall's government, Sonko said he was being "illegally held" by security forces.

"I urge all Senegalese people to come out onto the streets," he said on social media.

He added: "Everyone should rise up as one, because power should remain with the people."

Sonko, 48-year-old leader of the PASTEF-Patriots party, is a fiery critic of head of state Macky Sall and wields a big following among young people.

He came third in the 2019 presidential elections and has already declared he will contest next year's ballot.

He faces the expected verdict on Thursday of a rape trial whose details have left the conservative West African state riveted.

Sonko denies the allegations and says his prosecution is a political plot to bar him from the 2024 vote.

Tensions have stoked fears of a repeat of deadly violence that has battered Senegal's standing as a beacon of stability in troubled West Africa.

When Sonko was arrested in 2021, several days of clashes left at least 12 people dead. Several more have died in sporadic violence this year.

Sonko boycotted the first two sessions of the trial, citing security reasons.

But last Friday, he set out for Dakar at the head of a so-called "caravan of freedom" of supporters from Ziguinchor, a city in southern Senegal where he is mayor.

The convoy led to clashes with security forces in which one man died before police swooped in and took him to Dakar.

Sonko resurfaced on social media overnight Monday to say he was being "illegally held" and make the call for mass protests.

"How can a country that calls itself a democracy justify confining without any legal basis a citizen whose only wrong was to be a fervent and unflinching opponent of Macky Sall's regime?" he asked.

He called for a "national resistance movement" to defend democracy and freedoms.

- Legal storm -

Feelings among Sonko supporters are running high ahead of the climax of the trial.

Young followers clashed with police in several areas of Dakar on Monday.

The trial is based on allegations of sexual assault and death threats, filed by a worker at a Dakar beauty salon.

Conviction for rape in Senegal carries a jail term of 10 to 20 years.

Sonko has said he went there for a massage for chronic back pain and says the case against him is politically motivated.

His bid for the presidency has also been clouded by a six-month suspended sentence, handed down in March, for defaming Tourism Minister Mame Mbaye Niangtou.

Political tensions have also been stoked by Sall's refusal to rule out running for a third term as president, a move his opponents say would be unconstitutional.

President Sall has called for a national dialogue to be held Wednesday to ease tensions. Sonko has said he will boycott the meeting, while Khalifa Sall, another opposition candidate, has said he will attend.

Sall was elected in 2012, when the presidential term was seven years, and re-elected in 2019, when the term was reduced to five years.