After talks fraught with tension, Sudan's generals and lead protesters reached a deal to share power on Friday until elections can be held in three years. The news sparked scenes of jubilation in the capital Khartoum with protesters chanting: "the martyrs' blood has not been shed in vain." On 3 June, more than 100 people were killed in a brutal raid by security forces on a sit-in camp.
The two sides agreed to establish a joint military-civilian sovereign council that will rule the country by rotation "for a period of three years or slightly more", African Union mediator Mohamed Hassan Lebatt, said at a news conference on Friday.
"It's a compromise," said Amged Farid, spokesperson for the Sudanese Professional Association (SPA), a group of doctors, lawyers and teachers, who have been leading the mass protests.
"It's not a power-sharing deal. It's basically an opening to establish a civlian-led government in Sudan through establishing institutions that have checks and balances between them," he told RFI.
The question of who should take over following the ousting of long-time President Omar al-Bashir had poisoned talks up until now.
Rather than choosing a civilian or a soldier, Sudan's ruling military council and a coalition of opposition groups agreed to set up a sovereign council that includes members of both.
"You have five members from each side, then an agreement on an independent civilian to be the eleventh member, likely a retired officer, so again it's a compromise," explains Ahmed Soliman, a research fellow at London-based think tank Chatham House.
"The key element for the transition is this need for trust and willingness to compromise in order to chart the way forward," he told RFI.
The agreement will see Sudan's military council that currently runs the government, in charge for the next 21 months, then a civilian-run administration for the remaining 18 months.
Getting here has not been easy.
"People were worried that trust had been broken after last month's violence," continues Soliman, after scores of pro-democracy demonstrators were killed in a brutal military crackdown on a protest camp in the capital, Khartoum.
"We want to reassure all political forces, armed movements and all those who took part in the change…that this agreement will be all inclusive and does not exclude anyone," the ruling military council's number two General Mohamed Hamdan Dagalo, said after the deal was reached.
The ruling Transitional Military Council (TMC) and the civilian leaders also agreed to launch a "transparent and independent investigation" into the 3 June crackdown, which Soliman reckons is a good gauge of confidence.
"There are differences within the army and the opposition, which have to be narrowed to ensure stability," he added.
The African Union and neighbouring Ethiopia had stepped up mediation efforts to end the crisis, but for Soliman the real work begins now.
"People have to set aside personal interests to move forward. For the transition to be successful there has to be reforms," starting with "the business environment that is still entrenched by the old regime," said Soliman.
Rather than an end to military rule, Friday's deal is an extension of it, reckons analyst Joseph Ochieno.
"The military have been given a lifeline here," he comments. "Elements of the military may have removed their uniforms to form part of the future democratic system of Sudan, however, the history of Africa is such that many of these guys become civilian political democrats in uniform only."
The eagerly awaited deal nonetheless triggered celebrations on the streets of Khartoum before dawn on Friday.
Power to the people
Ochieno is not surprised. "The protesters have created a precedent on the African continent, in that guys from the streets have compelled guys with guns to listen and force a process that hopefully in three years time we will see Sudan return to a free and democratic government."
A process which Ochieno says could inspire countries like Algeria, which like Sudan has been gripped by months of political deadlock.
For the protesters themselves, their revolution will continue.
"We did not achieve 100 percent of what we want but it's an opening," said Amged Farid of the Sudanese Professional Association.
"The Sudanese people who faced the tyranny of Omar al-Bashir and the reluctance of the TMC in the previous weeks to hand over power, will continue as guardians of the revolution," he concluded.