When Omar al-Bashir seized power in Sudan in a bloodless coup in June 1989, he was a relatively unknown army officer - now he is famous, or infamous, all around the world.
He has ruled Sudan for longer than anyone in history - and despite the war crimes charges he faces at the International Criminal Court (ICC), still has some popular appeal at home.
The 1989 coup was actually masterminded by veteran Islamist politician Hassan al-Turabi, who in effect was in charge for a decade.
With Mr Turabi pulling the strings, Sudan charted a radical course.
Extremists like Osama Bin Laden moved to Sudan, and Islamic law was applied strictly, alienating the millions of non-Muslims in southern Sudan and elsewhere.
Many Sudanese Muslims were appalled too.
"Where did these people come from?" Sudan's most well-known novelist, Tayeb Salih, famously asked.
The security forces were beefed up, and gained a fearsome reputation for torture and brutality, particularly in the "ghost houses" where detainees often disappeared.
Before the coup, the southern Sudan People's Liberation Movement (SPLM) rebels and the government were on the verge of signing a peace agreement.
Mr Bashir and his allies, however, took a different path, intensifying the war.
'Master of survival'
In 1999, President Bashir, to general surprise, won a power struggle with Mr Turabi.
From this point on, the government abandoned any plans to revolutionise Sudan and the neighbourhood.
The main goal became survival.
Who is Omar al-Bashir?
- Born on 1 January 1944
- Married to Fatima Khalid and Widad Babiker
- Joined army in 1960
- Trained at Egyptian Military Academy and served in Egyptian army during 1973 war with Israel
- Seized power in 1989 coup
- Signed 2005 peace deal to end north-south civil war
- Accused by ICC of genocide in Darfur
- Won Sudan's first multi-party election in 2010
- Oversaw independence of South Sudan in 2011
Mr Bashir leads a complicated informal coalition of Islamists, pragmatists, generals and security officers.
All these components are constantly competing for a more prominent role. The one constant is President Bashir.
"He combines the political knowledge with the military knowledge, which makes him somewhat difficult to compete with," said Samia Ahmed, the deputy speaker of parliament, in her assessment of the president.
Mr Bashir is able to appeal to all the parts of his coalition - or at least no-one wants to take the risk of their faction losing out if there was a change at the top.
The president is also more popular in Sudan than many outsiders believe.
He dances at rallies, waving his swagger stick to huge cheers, and speaks the language of the ordinary man.
Unlike Sudan's previous leaders, he was not a product of the entitled elite.
Yet this alone would not be enough to keep a leader in power for a quarter of a century.
Under President Bashir, the security services stop any public protests.
Opposition parties and the press are muzzled.
Patronage has been ably used too, particularly in a decade-long oil boom, which started in 1999 and changed the face of the capital, Khartoum.
The oil wealth and development was spread unevenly - one of the great themes running throughout Sudanese history - but it did buy some loyalty.
Beyond all this, though, if there is one over-riding constant of President Bashir's time in power, it is conflict.
There has not been a day of peace in Sudan since Mr Bashir's coup.
The war in the south ended in 2005, but by then the western region of Darfur was in flames.
The war in the east finished in 2006, but in 2011, as South Sudan seceded, new wars broke out in old Sudanese trouble spots in Southern Kordofan and Blue Nile.
The rebels' willingness to fight is partly responsible.
The government, though, must take the most blame.
When fighting broke out, Mr Bashir typically responded with what has been called "counter-insurgency on the cheap" - using air power and ethnic militias to tackle the rebels.
No successors groomed?
President Bashir has been accused of orchestrating war crimes, crimes against humanity and genocide in Darfur.
He has denied all the charges.
"What is being alleged now is pure lies. This is a pure and fabricated political game," he told the BBC.
Mr Bashir and his inner circle believe Western countries have attempted to overthrow the president, including by sponsoring rebellions, UN Security Council resolutions and the charges laid by the International Criminal Court.
US sanctions have undoubtedly harmed Sudan's economy.
The 2011 secession of South Sudan was a colossal blow too, as three-quarters of daily oil production was in the south.
President Bashir believes he has not received sufficient international praise for his willingness to let the south go.
Following the split, he has struggled to cope with conflict, a feeble economy, and even criticism from within the Islamist movement.
There is also frequent speculation about his health.
He has said he will not stand in the 2015 elections, but his supporters are encouraging him to change his mind.
When I told one Bashir supporter I was evaluating the president's record time in power, he jokingly asked whether I meant the last quarter of a century, or the 25 years to come.
The president would have to be very sure of his successor to step down, with the threat of the ICC's indictment ever-present.
"I think that Bashir will stay in power longer than many people think," the Sudanese political commentator Nesrine Malik says.
This is in part because he has not "groomed any successors even within the Islamist regime".
"They have no other alternative to transition out in a graceful manner."
Even after a quarter of a century, the great survivor of Sudanese politics may not be finished yet.
He has his supporters.
But for his Sudanese enemies - and there are millions of them - President Bashir's time in power has been the darkest period in Sudan's troubled history.