Sudan's protesters and ruling generals Wednesday inked a deal that aims to install a civilian administration, a key demand of demonstrators since president Omar al-Bashir was deposed in a coup three months ago.
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."
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 agreement was described as "a crucial step towards a comprehensive reconciliation" by African Union mediator Mohamed El Hacen Lebatt.
The US embassy in Khartoum congratulated "the Sudanese people" and urged both sides to continue their talks.
Tibor Nagy, the US assistant secretary of state for Africa, tweeted: "We look forward to welcoming new civilian leaders and working with the new institutions to address the pressing challenges facing Sudan."
The accord stipulates that a new transitional ruling body be established, comprised of six civilians and five military representatives.
The civilian representation will include five from the Alliance for Freedom and Change, according to the declaration.
A general will head the ruling body during the first 21 months of a transition, followed by a civilian for the remaining 18 months, according to the framework agreement.
The governing council is to oversee the formation of a transitional civilian administration that will operate for just over three years, after which elections would be held.
Amin said Wednesday that wider power sharing details would be fleshed out in a "constitutional document" and that talks would resume Friday.
These talks are expected to address whether to grant "absolute immunity" to generals for violence against protesters.
Prior to entering the latest talks on Tuesday evening, protest leader Ahmed al-Rabie told AFP the movement "totally reject" offering immunity.
But military council spokesman General Shamseddine Kabbashi said Wednesday there was "no dispute" over the issue.
Other areas still to be ironed out include the creation of a transitional parliament and a potential RSF withdrawal from Khartoum -- the latter an increasingly vocal demand of citizens on the streets.
Tensions climaxed on June 3 when armed men in military fatigues stormed a longstanding protest camp in Khartoum, shooting and beating crowds of demonstrators in a pre-dawn raid.
Dozens were killed and hundreds wounded, triggering international outrage -- and allegations that the RSF was behind the killings -- although the generals insisted they did not order the crackdown.
The RSF has faced further fury after the protest movement accused its members of being responsible for the deaths of six civilians since Saturday, including one allegedly shot dead and another who was reportedly tortured.
Dagalo has insisted that accusations against his paramilitary force represent an attempt to distort its image.