Sudan’s ousted Prime Minister Abdalla Hamdok is to be reinstated, after being placed under house arrest during a military coup last month.
All political detainees will be released as part of a new agreement between the military, civilian leaders and ex-rebel groups, mediators said.
On 25 October, Sudan’s military had declared a state of emergency and dissolved the civilian leadership.
It sparked weeks of mass protests in which at least 40 people have died.
The deal was reached late on Saturday night, and is to be signed into action on Sunday, the head of Sudan’s Umma Party, Fadlallah Burma Nasir, confirmed.
Mr Hamdok has agreed to the terms so that further bloodshed can be avoided, Reuters news agency reports, citing a source close to him.
The group of mediators, which included academics, journalists and politicians, released a statement outlining the terms of the agreement.
In addition to announcing the PM’s reinstatement and the release of detained cabinet members, it says the rules governing Sudan’s transition towards democracy will be restored.
Sudan’s military and the Forces for Freedom and Change (FFC), a loose coalition of civilian groups, have been in a fractious power-sharing arrangement since August 2019, after long-time leader Omar al-Bashir was overthrown amid mass protests.