Just a few months ago, the man set to be Senegal's next president, Bassirou Diomaye Faye, was sitting in a prison cell, a relatively unknown figure outside his opposition party Pastef.
Everything changed for him when the party's firebrand leader, Ousmane Sonko, who was also detained, was charged with insurrection in July and barred from running in elections to succeed President Macky Sall.
That cleared the way for Faye to emerge from the shadow of his former boss and eventually from prison, take over the race and on Monday - the day of his 44th birthday - emerge as victor after his opponent conceded defeat.
It was an unlikely climb to the top for an unlikely national figurehead. Faye was a tax inspector before he became Sonko's trusted lieutenant and Pastef's secretary general.
Where Sonko is charismatic, with a verve that has attracted thousands of country's jobless youths to his anti-establishment movement, Faye cuts an austere figure.
Sonko's endorsement of his former deputy in the run-up to Sunday's delayed election was crucial, but a little short on rabble-rousing emotion.
"My choice of Diomaye is not a choice from the heart, but from reason. I chose him because he meets the criteria that I have defined. He is competent and has attended the most prestigious school in Senegal," Sonko said in a video message.
'HE IS MORE HONEST THAN ME'
"No one can say he is not honest. I would even say that he is more honest than me. I entrust the project into his hands," Sonko said.
According to Faye's biography on his campaign website, he was often the top of his class growing up. He graduated from high school on Senegal's southern coast in 2000, then studied law and got a master's degree from Dakar's Cheikh Anta Diop University.
In 2004, the devout Muslim passed the competitive entrance exam to Senegal's National School of Administration which trains the former French colony's top civil servants, where he specialised as a tax inspector.
He was arrested in April 2023, a few months before Sonko was also held, and charged with contempt of court and defaming magistrates, charges Faye had denied. Crucially, unlike Sonko, he was not barred from running in elections.
Convinced that Sonko's detention and the banning of Pastef were part of a ploy by Sall's government to eliminate strong rivals from the election - all accusations rejected by the government - several party members including Faye put their names forward.
Faye eventually made the cut while still in prison, despite a late challenge from ruling coalition candidate Amadou Ba to have his candidacy rejected by the Constitutional Council.
A coalition of more than 100 parties, and some political heavyweights including former prime minister Aminata Toure, joined Faye's campaign under the banner "Doimaye mooy Sonko", which in the local wolof language means "Diomaye is Sonko."
'ONLY ONE PERSON IS ELECTED'
Thanks to a general amnesty law passed shortly before the vote to ease political tensions, Sonko and Faye left their prison cells in Dakar earlier this month, accompanied by thousands of supporters who danced and chanted through the night.
Both hit the campaign trail, crisscrossing the country and drawing thousands to their rallies and caravans.
Sidy Lamine Badji, a 36-year-old part-time driver who voted for Faye on Sunday, rejected criticism that the candidate who lost a municipal election in his home town in 2022 was inexperienced in government affairs.
"This is false. He has dignity. I believe in his promise and that he will not betray us," Badji said, his voice choking.
Faye has declined to say what role Sonko might play in any future government, and has insisted he will be his own man.
"Why do we want to focus on just one person in a government when I have a coalition that includes more than 120 people?" he said, brushing off concerns held by some voters that if he won, the country would end up with two men who believe they are president.
"In a presidential election, only one person is elected in the end, and it's he who is the president of the republic," Faye said.
Reuters