Sudan's Omar al-Bashir, facing a possible appearance before the international war crimes tribunal, defied rebellions, economic crises and the hostility of the West before being overthrown as president by the military last year.
Bashir, who seized power in a bloodless coup in 1989, is currently in Khartoum's Kober prison, where he had locked up his opponents while in office.
On Tuesday, the transitional government that succeeded Bashir and rebel groups in Darfur that had opposed him agreed that all five Sudanese suspects wanted by the International Criminal Court over Darfur should face justice.
Bashir is one of those five suspects, wanted by the Hague-based ICC for war crimes. He says the tribunal's allegations are part of a Western conspiracy. His lawyer said he refuses to have any dealings with what he calls a "political court".
During his 30 years in power, Bashir was a master at playing rival factions among security services, the military, Islamists and armed tribes off against each other.
But he underestimated the anger of young Sudanese men and women demanding an end to economic hardship.
Bashir ultimately faced almost daily defiance in towns and cities across Sudan despite a crackdown by security forces using tear gas and sometimes live ammunition, in which dozens of people were killed.
Addressing soldiers in January 2019, Bashir warned the "rats to go back to their holes" and said he would move aside only for another army officer or at the ballot box.
"They said they want the army to take power. That's no problem. If someone comes in wearing khaki, we have no objection," Bashir, wearing his military uniform, told soldiers at a base in Atbara, the northern city where protests erupted.
Bashir went on to declare a state of emergency that expanded police powers and banned unlicensed public gatherings.
Bashir, 76, has always been a divisive figure.
After taking office in what was then Africa's largest country, he fought a protracted civil war with southern rebels which ended with the secession of South Sudan in 2011, and the loss of more than 70 percent of Sudan's oil.
Sudan has suffered prolonged periods of isolation since 1993 when the United States added Bashir's government to its list of terrorism sponsors for harbouring Islamist militants. Washington followed up with sanctions four years later.
The protests in Sudan that ousted Bashir followed the success of demonstrations in Algeria that forced out long-ruling President Abdelaziz Bouteflika.
In the months before protests began in Sudan, people had already been struggling to makes ends meet.
The government had hoped for quick financial support from wealthy Gulf Arab allies after Bashir sent troops to Yemen as part of a Saudi-led alliance fighting an Iranian-backed movement, but help was slow to arrive.
The trigger for the wave of protests was a government attempt to introduce unsubsidised bread. The demonstrations quickly turned political, demanding Bashir step down.