He rallied Senegalese youth to enable the election of his top lieutenant Bassirou Diomaye Faye as president.

Now, as expected, he has secured a top role in return.

A fierce opponent of former president Macky Sall, Sonko was barred from standing in the March 24 presidential election because of a conviction for defamation.

He denied any wrongdoing.

Sonko chose the little-known Faye as his replacement, urging his supporters to back him instead.

"There will be no war because these elections will not be a battle. The real challenge will be to see how to manage this country after the elections. These are the two things we have left. We are at this stage. Some think we will seek revenge. There will be no revenge, there will be justice."

After rising to prominence when he came third in the 2019 presidential election, Sonko has faced arrest and trial several times.

He was accused of rape in 2021 and detained.

That triggered a wave of deadly clashes between police and his young supporters.

He was ultimately convicted of morally corrupting a young person in that case, and the rape charge was dropped.

He was arrested again in July 2023 and charged with fomenting insurrection, criminal conspiracy and other offenses.

Sall's government dissolved Sonko's Pastef party days after, blaming it for stoking violence.

He was handed a six-month suspended sentence for defamation which blocked him from contesting the March vote.

Sonko has said all charges were politically motivated.

He and Faye both left jail less than a month ago thanks to a new amnesty law introduced to ease tensions in a country that is usually one of West Africa's most stable democracies.

Both former tax inspectors, the pair have positioned themselves as opponents to corruption and elitism and called for Senegal to reject what they see as lingering ties to French colonialism.

In their campaign manifesto, the duo promised to renegotiate mining, oil and gas contracts and create a new national currency.

Sonko is a devout Muslim in favor of harsher laws against homosexuality in Senegal, where more than 90% of the population is Muslim.

Gay sex is already punishable by jail time in the country.

He drew criticism in May from women's groups and dozens of well-known figures for making degrading comments against the alleged victim during his rape trial, which they said showed he was unfit for higher office.