For Kenyan opposition leader Raila Odinga, Friday's Supreme Court ruling nullifying last month's presidential election is a rare win in a life spent at the losing end of his country's infamously harsh politics.
The 72-year-old spent years as a political prisoner and has mounted four failed attempts to win the top job. August's elections, that he lost to President Uhuru Kenyatta, were widely expected to be his last shot.
Now Odinga has another chance, though he still faces an uphill climb - Kenyatta's party swept the legislature and local elections, and the now-voided results put him 1.4 million votes ahead in August's vote.
"This indeed is a very historic day for the people of Kenya, and by extension for the people of the continent of Africa," a grinning Odinga told wildly cheering supporters outside court.
Odinga will likely seek to get an edge this time by focusing still harder on accusations of corruption and rigging against Kenyatta. The judges did not say the victorious candidate himself was guilty of any wrongdoing, but found irregularities serious enough to order another vote in 60 days.
Representing Nairobi's Kibera slum, one of Africa's largest, Odinga projects himself as a champion of the poor. He frequently criticizes Kenyatta, scion of one of Kenya's wealthiest families, for his large landholdings and big business interests.
The president campaigned for a second five-year term on his record of large infrastructure projects and pro-business policies. On Thursday, Kenyatta's ruling Jubilee party said they would use their majority in the legislature to push through more projects.
A self-described leftist educated as an engineer in communist East Germany, the young Odinga cultivated a firebrand image, naming his first son Fidel Castro and adopting the nickname "Agwambo," or "controversial one" in his native Luo tongue.
Accused of agitating against the one-party state, including having a hand in a failed 1982 coup against President Daniel Arap Moi, Odinga served nine years in jail, six of them in solitary confinement.
After his release, he fled to Norway, fearing for his life.
More recently, Odinga reinvented himself as patriarch of a successful family business, producing gas cylinder makers and molasses. Supporters began calling him "Baba," a respectful and affectionate term, instead of "Agwambo."
His campaign focused on the problems facing Kenya's $63 billion economy, East Africa's largest, in the form of rising inflation, a lack of jobs and shortages of staple foods such as maize flour after a severe regional drought.
Odinga has promised to cut down on corruption and slash the government borrowing that pushed national debt to more than 50 percent of GDP. The cash financed Kenyatta's big infrastructure projects, like a $3.2-billion Chinese-built railway linking the capital to the port of Mombasa.
The son of Kenya's first vice president, Odinga was heir to one of its foremost political dynasties and de facto leader of the Luo people in the west, an area that has long felt neglected by central government.
Three of Kenya's presidents since independence from Britain in 1963 have been Kikuyu and one has been from the Kalenjin tribe. That dominance has provoked resentment from Kenya's other 43 tribes. Kenyatta, the son of the first president, is a Kikuyu and his deputy is a Kalenjin.
Odinga first tried for the presidency in 1997, coming third. A decade later, he tried again, but the election board abruptly stopped tallying and declared incumbent Mwai Kibaki the winner. Odinga called for street protests, triggering ethnic violence that claimed 1,200 lives.
The killing ended with the formation of a power-sharing government, which passed a constitution designed to prevent such ravages by strengthening democratic institutions and devolving power and money.
That watered down the winner-takes-all aspect to the presidential contest in a country notorious for corruption, although it didn't ensure taxpayer dollars were any better spent.
In 2013, Odinga ran again, but Kenyatta won. Odinga went to court after the widespread failure of electronic voting equipment, but his case was dismissed.
After the August results were announced, opposition officials vacillated over whether to call protests before finally going to court after intense international pressure. Odinga said the ruling vindicated their decision, and would ensure peace.
"The ruling today shows that when there is justice, peace prevails," he said. (Additional reporting by James Macharia Chege; Editing by Andrew Heavens)Suggest a correction