Jailed Senegalese opposition figure Ousmane Sonko (C) finished third in the 2019 presidential election
Jailed Senegalese opposition figure Ousmane Sonko (C) finished third in the 2019 presidential election AFP

A Senegalese judge on Thursday ordered that jailed opposition leader Ousmane Sonko be reinstated on the electoral roll, clearing the way for him to stand in next year's presidential election.

Sonko was struck off Senegal's electoral register after being sentenced in June to two years' imprisonment for morally corrupting a young person.

The 49-year-old political thorn in President Macky Sall's side finished third in the 2019 presidential election.

But his deregistration from the electoral lists rendered him ineligible to take part in the February polls.

Sonko has been at the centre of a stand-off with the state that has lasted more than two years and sparked several episodes of deadly unrest.

In ordering Sonko's reinstatement, the judge in the capital Dakar confirmed a ruling in October by a court in Ziguinchor, the southern city where Sonko is mayor.

Last month, the West African nation's top court had disagreed with that regional court ruling.

But it nevertheless decided that Sonko's case should go back to the Dakar court.

Sonko now has until December 26 to present his candidacy and obtain the necessary sponsorships.

Jubilant supporters were in court on Thursday and shouted his name after the ruling was announced.

The firebrand politician has faced a series of legal woes over the past two and a half years.

He and his lawyers say the court cases are part of a plot to torpedo his political career.

But El Hadji Diouf, lawyer for the state, said: "We will file an appeal in cassation as we did in Ziguinchor and the same procedure will take its course and the decision will be overturned.

"Those celebrating today got it all wrong."

One of Sonko's lawyers, Cire Cledor Ly, said that although the state could lodge an appeal with the Supreme Court, it would not stop Thursday's decision being implemented immediately.

"The electoral code is very clear. When the judge gives his decision, this decision must be immediately carried out," he said.

After the regional court ruling, the General Directorate of Elections refused to give Sonko the official papers required by candidates to gather sponsorships.

The national electoral commission, however, asked the body to reinstate Sonko on the electoral lists and give him the documents he needed.

Sonko was convicted in absentia on June 1 of morally corrupting a young person and sentenced to two years in prison.

In late July, he was arrested on other charges including fomenting insurrection, criminally associating with a terrorist body and endangering state security.

He has periodically been on hunger strikes since then.

He denounces the cases against him as machinations aimed at keeping him out of the presidential election. The government denies any manipulation of the justice system.

Sonko is particularly popular among the under 20-year-olds, who make up half the population, striking a chord with his pan-Africanist rhetoric and tough stance on former colonial power France.