A court in Senegal has handed down a two-year prison sentence to prominent opposition figure Ousmane Sonko on charges of “corrupting youth.” The ruling, announced on Thursday, acquitted Sonko of rape charges and issuing death threats.

Sonko, a candidate in the upcoming 2024 presidential election, was accused of sexually assaulting a woman employed at a beauty salon in 2021 and allegedly threatening her life. Maintaining his innocence, Sonko has boycotted the court proceedings, denouncing them as politically motivated.

The case has sparked violent protests, with Sonko’s supporters vehemently criticizing the charges against him as a government-led effort to undermine his political career. Government officials and justice authorities have refuted these claims.

Sonko’s defense has consistently accused President Macky Sall of manipulating the judiciary in an attempt to derail Sonko’s political aspirations—a charge firmly denied by the government.

Had Sonko been convicted of rape, he could have faced a maximum sentence of 20 years in prison. However, his electoral eligibility had already been overshadowed by a six-month suspended prison sentence for defaming a minister.

In Senegal, corrupting young individuals, which involves using one’s position of power to engage in sexual activity with individuals under the age of 21, is a criminal offense punishable by up to five years in prison and a fine exceeding $6,000.

According to defense lawyer Bamba Cisse, Sonko’s conviction under Senegalese law would prevent him from participating in next year’s presidential election.