Sudan's ousted Prime Minister Abdalla Hamdok is to be reinstated, after being placed under house arrest during a sudden 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 October 25, Sudan's military general suddenly declared a state of emergency and dissolved civilian leadership.
It sparked weeks of mass protests that left scores of people dead.
The deal was reached late on Saturday night, and is to be signed into action later on Sunday, the head of Sudan's Umma Party, Fadlallah Burma Nasir, confirmed.
The group of mediators, which included academics, journalists and politicians, released a statement outlining the terms of the agreement.
It says that Mr Hamdok and his cabinet members who were detained during the coup will be released and that he will return to his position as prime minister.
It also says the rules governing Sudan's transition towards democracy will be restored.
Sudan's military and civilian leaders have been in a fractious power sharing arrangement since August 2019, after the country's long-term authoritarian president, Omar al-Bashir, was overthrown.
That arrangement was thrown into crisis last month when military leader, Gen Abdel Fattah Abdelrahman Burhan, dissolved the civilian arm of the government and arrested its leaders.
He said it was not a "coup", but a move needed to prevent a civil war that was threatening to erupt because political groups had been inciting civilians against the security forces. He appointed himself as the head of a new ruling council, with military and ex-rebel leaders by his side.
Across many cities, including the capital Khartoum, anti-coup protesters put up makeshift barricades and burnt piles of tyres, angry that their already-fragile path to democracy had been hijacked. The army responded violently, and are accused of shooting protesters.
The new agreement comes ahead of more rallies that were planned for Sunday.
The international community condemned the coup and demanded the release of political prisoners. The World Bank froze its aid to Sudan, and the African Union (AU) suspended the country's membership of the bloc.
Coups are not uncommon in Sudan, and there have been several failed attempts since 2019, including one just a few weeks before the latest power grab.
Latest Stories
-
Insinuating Bagbin is not heeding calls for recall because he is NDC unfounded and unfortunate – Parliament
44 mins -
Ashanti, Nelly are engaged and expecting a baby
2 hours -
New Ghana train on test run involved in accident
2 hours -
World Bank, AfDB partner to provide 300m African’s with electricity access
2 hours -
Ghana wins preliminary ruling in Cassius Mining’s $300m international arbitration
2 hours -
Ghana’s revenue-to-GDP ratio to exceed 17% within next six years, but expenditure to remain flat – IMF
2 hours -
Gborbu Wulomo didn’t marry Naa Okromo – Chieftaincy Minister
2 hours -
Oquaye Jr. says he’s undeterred by ‘propaganda’ twist to viral laundry video
2 hours -
Ghana’s debt-to-GDP ratio to tumble to 69.7% in 2029 – IMF
3 hours -
Interior Ministry imposes 4pm to 7am curfew on Sampa
3 hours -
Child marriage: Teenage girl to be released to her family – Gender Minister-designate
3 hours -
Naa Okromo is 15 years old, still a virgin and not married to Gborbu Wulomo – Government
3 hours -
GhIE condemns intervention by Ashanti Regional Minister in ECG Affairs; commends ECG GM for upholding regulatory standards
3 hours -
GPL: Asantehene tasks Asante Kotoko to do ‘better’ after crucial meeting
3 hours -
Why Sam Jonah can’t trust Ghanaian journos to cover Election 2024 professionally
4 hours