Sudan’s ruling military council and opposition leaders have signed a power-sharing accord after all-night talks.
It is a “historic moment” for the country, the deputy head of Sudan’s ruling military council, Mohamed Hamdan “Hemeti” Dagolo, is quoted as saying by AFP news agency.
Sudan has been in turmoil since the military ousted President Omar al-Bashir in April.
Protesters have been demanding the military hand power to civilians.
Those protests turned deadly in a crackdown on 3 June which left dozens of protesters dead.
- Sudan’s violent political crisis explained
- The warlord who may control Sudan’s future
- Africa Live: Latest updates on this and other stories
They have agreed to rotate control of the sovereign council – the top tier of power – for just over three years.
That council will be made of five civilians, five military figures, and an 11th civilian, to be chosen by the 10 members.
A military general will be in charge of that council for the first 21 months, then a civilian will lead for the following 18 months, followed by elections.
A second agreement on constitutional issues is expected to be finalised on Friday.
How significant is this deal?
By Tomi Oladipo, BBC Africa security correspondent
After months of on-and-off talk, the two sides have finally signed a deal. That is notable in itself.
The agreement means that after 30 years of military rule, Sudan is now three years away from a fully civilian administration – in theory.
The finer details of the deal and its constitutional elements have not been agreed upon. There is still a “sovereign council” to be appointed to lead the country through its transition.
However some among the protesting masses might feel that they’ve got the short end of the stick.
The very military they challenged – and under whom they suffered pain and death on the streets – remains in power for now and will lead the interim government initially. The generals could possibly secure immunity from prosecution.
Justice in the eyes of the protesters will not have been served yet, but their chants for the fall of the regime have ushered in this new phase.
Just before protest leaders and ruling generals sat down to fine-tune the deal on Tuesday night, a protest leader told reporters that they refused to accept the military’s request for immunity for violence against demonstrators.
The agreement they signed does not mention immunity. It does, however, promise an investigation into the violence.
Protesters accuse government forces of killing more than 100 protesters during a sit-in against the transitional military council on 3 June.
BBC Africa Eye has analysed more than 300 videos shot in the capital Khartoum on that day:
Sudan military and civilians sign deal to end deadly turmoil