Sudan's President Omar al-Bashir is the master of tactics, but the tidal wave of popular protest is beyond anything he has faced before, writes Sudan expert Alex de Waal.
Protests against the government of President Bashir reached a climax on the symbolic date of 6 April, which is the anniversary of a non-violent uprising that removed the dictator Jaafar Nimeiri in 1985.
They began in the northern town of Atbara on 19 December 2018, focused on high food prices, and quickly spread to other towns and cities across Sudan. The demonstrations changed from a narrowly economic agenda to demanding that President Bashir, who took power in a coup in June 1989, step down.
The protests have continued for close to four months, gaining in numbers and organisation, almost entirely non-violent. According to who is counting, between 45 and 60 people have been killed by government forces firing on the demonstrators, and hundreds have been arrested - some of them tortured.
Omar al-Bashir at a glance:
- Fights in Egyptian army in 1973 Arab-Israeli war
- Seizes power in Sudan in 1989 in an Islamist-backed coup
- Gives asylum to al-Qaeda leader Osama bin Laden in 1990s
- First head of state indicted by ICC in 2009, but denies accusations of war crimes in Darfur
- Makes peace with southern rebels in 2005
- Oversees secession of the south in 2011, leading to Sudan losing three-quarters of its oil wealth
- Little is known about his private life. He has no children
Read more: Profile: President Bashir
President Bashir declared a state of emergency on 22 February, replacing civilian governors and other high officials with army officers. This move was sparked by a power struggle within the top echelons of the regime - the army, the ruling National Congress Party, and the National Intelligence and Security Service (NISS).
Mr Bashir agreed that he would stay in office until his presidential term expires in April 2020 and not seek re-election. But his promises carried little credibility with the demonstrators.
Strength in numbers
The groups leading the protests - the Sudanese Professionals Association and a number of opposition parties - have become more organised and are developing a political platform. But their basic demand has not changed.
They say they are ready to talk to the army - but not to Mr Bashir.
Over the last weekend, the protesters converged on the Ministry of Defence, the army headquarters and President Bashir's personal residence - all within the same huge compound near the airport.
Participating in shifts, they have stayed all day and all night. Their numbers are growing every day.
A campaign of defiance:
Mr Bashir has ordered the demonstrators to be dispersed, but according to reports from the notoriously leak-prone ruling elite, opinions differed as to how this should be done.
Army officers want to avoid violence, but some security chiefs and paramilitary groups are ready to use lethal force.
On at least one occasion, when security agents and paramilitaries started firing on the protesters, army units rallied to defend the crowds. There have been reports of shots exchanged between different security units. At least one junior army officer has defected to join the protesters.
Avoiding a massacre
There are fears of a massacre, akin to the killings in Tahrir Square in Cairo that heralded the collapse of the Husni Mubarak regime in Egypt.
Both sides are keenly aware of what this might entail.
One thing that the opposition has not demanded is that Mr Bashir be handed over to the International Criminal Court (ICC), where he faces prosecution for crimes committed in Darfur 15 years ago.
For them, the fate of the country is bigger than bringing one man to justice.
But that would change if the protesters were to be gunned down in large numbers.
In the aftermath of large-scale bloodshed, the clamour for accountability would become deafening, which would put Mr Bashir in a corner with no peaceful way out.
Ever since Luis Moreno Ocampo, when he was the ICC prosecutor, demanded an arrest warrant for Mr Bashir in July 2008, the Sudanese president has known that his only safe place is in Khartoum's presidential palace.
Mr Bashir is ageing and unwell and has repeatedly said he would rather step down - but no-one has been able to guarantee his personal future should he do so.
The UN Security Council can suspend the ICC arrest warrant, but only for one year, and the UK and France are unwilling to offer that concession.
Mr Bashir's power base lies in the armed forces; over the years he has built up strong bonds of loyalty from the officer corps.
He is now seeing that allegiance slipping away as his most senior generals openly speak of taking over.
Civil war fears
The other fear is that Sudan no longer has a unified security sector.
The country has two inspiring precedents of peaceful popular uprisings removing military rulers Gen Ibrahim Abboud in 1964 and Nimeiri in 1985. In both cases, a swift, decisive and peaceful revolution was possible because the army command ordered their troops to side with the people.
Today it is different. The NISS, headed by the veteran ruthless spy chief Gen Salah Gosh, has powerful forces within the capital.
There are numerous paramilitary groups such as the Central Reserve Police and the Rapid Support Force (originally a Darfurian militia) and Islamist militia associated with the ruling party.
Each of these has its separate command and control; many of them run private businesses; and some of them have their own links to foreign countries.
For example the Rapid Support Force is paid directly by Saudi Arabia to deploy battalions to fight in Yemen; Salah Gosh has close links with the United Arab Emirates; and the Islamist militia have links to sponsors in Qatar and possibly elsewhere.
At present, Mr Bashir is the spider sitting at the centre of this web: only he has the means to keep the various groups in check.
One of the worst fears of Sudanese is that, should these armed groups fragment when he goes, the country will face civil war.
Currently there's a stalemate with everyone in Sudan and abroad positioning themselves tactically.
Voices of protest:
The possible brokers of a deal that manages a transition to democracy and avoids the perils of massacre or civil war - the US, the Arab League and the African Union - are calling for restraint, and hoping for the best.
Until now Mr Bashir has been able to manipulate and manoeuvre and keep afloat amid Sudan's turbulent elite politics.
It's been Sudan's misfortune that their large-scale popular uprisings - in 1964 and 1985 - have been staged when the international community has not been ready to support democratisation.
The same counter-cyclical mismatch appears to be happening today, when there is little international appetite for such democratic movements.
Fearful of the possibility of chaos, as followed uprisings in Libya, Syria and Yemen, Western powers are cautious, focusing on stability.
This caution risks missing the slender opportunity for snatching a solution from the teeth of potential calamity.
Alex de Waal is the executive director of the World Peace Foundation at the Fletcher School of Law and Diplomacy at Tufts University.