Sudan’s military leaders have reached an agreement with the opposition alliance to share power until elections can be held, mediators say.
The two sides agreed to rotate control of the sovereign council – the top tier of power – for just over three years.
They have also pledged to form an independent technocratic government and to investigate the violence of recent weeks, the African Union (AU) said.
News of the agreement reportedly sparked frenzied street celebrations.
Sudan has been in turmoil since the military ousted President Omar al-Bashir in April.
That followed a popular uprising against Mr Bashir, who seized power in a coup in June 1989.
Seven people were killed and 181 were hurt in clashes that followed, state media reported.
The latest round of talks took place in the capital, Khartoum, earlier this week and were mediated by the Ethiopian prime minister and members of the pan-African AU.
What has been agreed?
“The two sides agreed on establishing a sovereign council with a rotating military and civilian [presidency] for a period of three years or a little more,” AU mediator Mohamed Hassan Lebatt told reporters on Friday.
The agreement will see the military in charge for the first 21 months, then a civilian-run administration for the following 18 months.
It’s “the first step in building a democratic country,” said veteran politician Siddig Yousif, who was one of the main civilian negotiators.
Asked whether the civilian leaders could convince protesters who might be nervous about the presence of the military in government, Mr Yousif told the BBC: “It is a difficult task, but we’ll try to convince our people that it will be a success”.
Elections will be held once this transition period ends.
Both sides also “agreed to have a detailed, transparent, national, independent investigation into all the regrettable violent incidents that the country faced in recent weeks,” he added.
They have also agreed to postpone the establishment of a legislative council.played a leading role in the protests in the mainly Muslim state
“We hope that this is the beginning of a new era,” Omar al-Degair, a leader of the opposition Forces for Freedom and Change (FFC), said after the announcement.
The deputy head of the Transitional Military Council (TMC), Gen Mohamed Hamdan Dagalo, said: “This agreement will be comprehensive and will not exclude anyone.
“We thank the African and Ethiopian mediators for their efforts and patience.”
What has the reaction been?
Protesters “definitely wanted much more” from the deal and many are a “little bit” sceptical about the details, says Lena al-Sheikh who was out on the streets of Khartoum at the height of the protests.
“We were saying: ‘Congratulations, is this real?'” she told the BBC’s Newsday programme.
“Because until 30 June, the military council has shown that… there was brutality against protesters, people died, people were hurt and we were thinking maybe this is never going to happen, maybe we are never going to reach an agreement.”
BBC regional analyst Mohanad Hashim says the deal falls short of demands for a totally civilian administration.
A sticking point for some people is that the military will choose the leader of the sovereign council first.
“The first 18 months looks like the military meaning to consolidate power and remain in power and just bide [their] time until they are able to leverage that to remain in control,” says Sudanese political commentator, Kholood Khair.
“What of [former President] Bashir? What of Salih Ghosh, the former head of the national intelligence service? There are many gaps in this document,” Ms Khair told BBC Focus on Africa.
As Sudan-based journalist Yousra Elbagir reports, an ongoing internet blackout in the country means many people may not yet know the details of the deal: