The move loosens a deadlock that has gripped the country, following nationwide mass protests that began against Bashir in December but then continued after a military council ousted him on April 11.

The unrest has also left scores dead, with more than 100 killed in a June 3 crackdown on a protest sit-in according to doctors close to demonstrators. The deputy chief of the military council General Mohamed Hamdan Dagalo — who initialled the deal on behalf of the generals on Wednesday — told AFP the agreement was a “historic moment” for Sudan. It has “opened a new and promising era of partnership between the armed forces, RSF (Rapid Support Forces) and leaders of the glorious Sudanese revolution,” Dagalo said in Khartoum after he had put pen to paper.

Dagalo also heads the RSF, a feared paramilitary organisation that has its origins in the Janjaweed militias unleashed against African rebels during the early 2000s in Darfur. Ibrahim al-Amin, a key protest leader, confirmed “today, we completed the political declaration.” Intense talks took place through the night over details of the political declaration at a luxury hotel on the bank of the Nile river, an AFP correspondent reported. As the generals stepped out of the hall after signing the deal, a small crowd — including women waving the national flag — chanted “civilian rule, civilian rule.”

‘Comprehensive reconciliation’

Scores of university students in Khartoum celebrated the deal.

“As citizens we are satisfied with this agreement, but we also want to avenge the deaths of our martyrs,” said student Iman Tayfor, as behind her others flashed victory signs and chanted “revolution”.

“We will not be silent until the government is fully civilian,” said another student Ahmed Abdelhalib. The landmark power sharing deal, which was agreed in principle on July 5, has been brokered by African Union and Ethiopian mediators after weeks of stop-start negotiations between the protest umbrella group and ruling generals.

“The Transitional Military Council and the Alliance for Freedom and Change have reached a very important agreement that constitutes a crucial step towards a comprehensive reconciliation,” said African Union mediator Mohamed El Hacen Lebatt.