Sudan's ousted President Omar al-Bashir's career has been defined by war. He came to power in a military coup in 1989 and ruled what was until 2011 Africa's largest country with an iron fist.
When he seized power, Sudan was in the midst of a 21-year civil war between north and south.
Although his government signed a deal to end that conflict in 2005, another one was breaking out at the same time - in the western region of Darfur, where Mr Bashir is accused of organising war crimes and crimes against humanity by the International Criminal Court (ICC).
Despite an international arrest warrant issued by the ICC, he won consecutive elections in 2010 and 2015. However, his last victory was marred by a boycott from the main opposition parties.
The arrest warrant has led to an international travel ban. However, Mr Bashir has still made diplomatic visits to various countries, including Egypt, Saudi Arabia and South Africa. He was forced into a hasty departure from South Africa in June 2015 after a court considered whether to enforce the arrest warrant.
Before taking the helm, he was a commander in the army, responsible for leading operations in the south against the late rebel leader John Garang.
When he signed the peace deal with Garang and his Sudan People's Liberation Movement, he took pains to stress the deal had not been a defeat. "We did not sign it after we had been broken. We signed it while we were at the peak of our victories," he said.
Accusations against Omar al-Bashir
- Killing members of the Fur, Masalit and Zaghawa ethnic groups
- Causing these groups serious bodily or mental harm
- Inflicting conditions of life calculated to bring about these groups' physical destruction
Crimes against humanity
- Forcible transfer
- Attacks on civilians in Darfur
- Pillaging towns and villages
His goal was always to keep a unified Sudan, but a referendum on secession for South Sudan was agreed as part of the peace deal.
In the January 2011 referendum, about 99% of South Sudanese voters were in favour of separation. The independent state of South Sudan was declared six months later.
While he agreed to let South Sudan go, his attitude to Darfur, where a conflict has raged since 2003 when rebels took up arms at alleged government discrimination, has been characterised by belligerence.
But he denies international accusations that he has backed Arab Janjaweed militias accused of war crimes against the region's black African communities.
Mr Bashir was born in 1944 to a farming family in northern Sudan - then Anglo-Egyptian Sudan. He is a member of al-Bedairyya al-Dahmashyya, a Bedouin tribe belonging to the larger Ja'alin group.
He joined the Egyptian army as a young man and rose through the ranks, fighting in the 1973 war against Israel.
Little is known about his private life. He has no children and took a second wife in his 50s. He married the widow of Ibrahim Shams al-Din, considered a war hero in the north - as an example to others, he said.
The long civil war had seen many colleagues fall, and he implored others to marry again so war widows could be taken care of.
As head of state, his focus largely remained soldiering - the political lead being taken by two other figures.
The first in the 1990s was Hassan al-Turabi, a prominent Sunni Muslim who until his death in 2016 advocated an Islamic state and ushered in a bill introducing Sharia to all provinces but the south.
After they fell out in 2000, Mr Turabi told the BBC: "He's a military person who has been in power for a while and he wants to assert military power."
Then Osman Ali Taha, a politician who negotiated the north-south deal, came to the fore. But his influence waned and the president took centre stage.
Sudan analyst Alex de Waal said Mr Bashir's longevity in office was probably down to the fact that powerful rivals in the ruling National Congress Party distrusted each other more than they did Mr Bashir.
But political unrest gained momentum quickly. Nationwide protests first started in December 2018 after the government announced that prices for fuel and bread would rise.
This turned into a wider call for Mr Bashir and his government to step down. Mr Bashir declared a state of emergency in February 2019, reshuffling his cabinet and replacing all state governors with members of the army and security forces.
After months of unrest, Sudan's military stepped in and finally toppled Mr Bashir on 11 April 2019.
Mr Bashir was later charged with incitement and involvement in the killing of protesters.
He also faces corruption charges, after prosecutors said a large hoard of foreign currency was found at his home.
Oil money flows - and leaves
For a while during his presidency, there were pockets full of dollars as the oil flowed, controls were lifted and the telecommunications system revolutionised. But the economy floundered since the secession of the south, which took three-quarters of the country's oil with it. Ever since, belts have had to be tightened in Khartoum.
Mr Bashir - who became president when it was punishable by death to be found in possession of US dollars - has denied accusations that access to government funds and oil money was an underlying cause of the unrest in Darfur.
It was perhaps inevitable that a soldier-president could only be brought down by the armed forces. Once they lost faith in his ability to maintain stability in the country, there was little he could do.
Despite the corruption trial, there will be little appetite to send him to also face justice at the ICC, as some of those who fought for him in Darfur retain considerable power and influence under Sudan's new dispensation.