Leading Senegalese opposition politician Ousmane Sonko was arrested on Friday, members of his party, a senior security official and a lawyer told AFP, although the precise reasons for the arrest were unconfirmed.

The firebrand politician and presidential candidate has faced a number of legal woes in recent years, which he claims are part of a plot to keep him out of politics.

Abdoulaye Tall, one of Sonko's lawyers, told AFP that he had been arrested for "stealing a mobile phone" and "calling for insurrection".

Earlier on Friday afternoon, Sonko had said on social media that security forces stationed outside his home had been filming him.

He said he had taken one of the phones and demanded the images be deleted -- a request which was denied.

"I ask the people to stand ready to face this endless abuse," he wrote in the post.

Ousseynou Ly, a spokesman for Sonko's PASTEF party, and Djibril Gueye Ndiaye, his head of protocol, also told AFP he had been arrested.

A senior security official confirmed the arrest but did not specify the reasons.

In a message posted on Twitter, which is being rebranded as X, Juan Branco, one of Sonko's lawyers, said the politician had been locked up in a courthouse basement.

The incident happened in late afternoon on Friday, a national holiday in Senegal.

On Friday evening, several police vehicles including two anti-riot trucks were parked outside the main courthouse in Dakar, two AFP journalists saw.

They later left the site but officer did not specify where they were going.

People were gathering outside Sonko's Dakar home, another AFP journalist reported.

In June, Sonko was sentenced in absentia to two years in prison for morally corrupting a young woman, a conviction that renders him ineligible to stand in next year's election.

The case sparked sporadic unrest that stretched over two years.

They culminated in fatal clashes at the time of his conviction that left 16 dead according to the government, 24 according to Amnesty International, and 30 according to Sonko's party.

He was blocked in his home by a security detail between May 28 and July 24.

A former civil servant, Sonko rose to prominence in presidential elections in 2019, coming third after a campaign that took aim at President Macky Sall and the country's ruling elite.

He has portrayed Sall as a would-be dictator, while the president's supporters call him a rabble-rouser who has sown instability.

Sall in early July eased tensions in the normally stable West African nation by announcing he would not seek a controversial third mandate, following months of ambiguity and speculation about his intentions.