The deal struck in <a href="https://www.thenationalnews.com/mena/2021/11/27/sudanese-politicians-released-after-starting-hunger-strike/" target="_blank">Sudan</a> to reinstate the <a href="https://www.thenationalnews.com/mena/2021/11/23/sudans-reinstated-prime-minister-hamdok-says-government-to-be-independent/" target="_blank">prime minister</a> following a military takeover is imperfect, but has saved the country from sliding into civil strife, the UN envoy to <a href="https://www.thenationalnews.com/mena/2021/11/22/abdalla-hamdok-says-he-returned-to-protect-sudans-economic-gains/" target="_blank">Sudan</a> said on Friday. Special Envoy Volker Perthes was speaking of the agreement between Sudan's military leaders and Prime Minister Abdalla Hamdok, who was deposed and put under house arrest last month, leading to international outcry. The military takeover threatened to thwart the process of a democratic transition that the country had embarked on since the removal of longtime president Omar Al Bashir. The deal, signed on Sunday, was seen as the biggest concession made by the country's chief military leader, Abdel Fattah Al Burhan, since the October 25 events. However, the country's pro-democracy groups have dismissed it as illegitimate and accused Mr Hamdok of allowing himself to serve as a fig leaf for continued military rule. “The agreement of course is not perfect,” Mr Perthes told the Associated Press. “But it is better than not having an agreement and continuing on a path where the military in the end will be the sole ruler." Both signatories felt compelled to make “bitter concessions” to spare the country the risk of more violence, chaos and international isolation, he said. “It would not have been possible to exclude a scenario which would have brought Sudan to something close to what we have seen in Yemen, Libya or Syria,” Mr Perthes said. He spoke to the AP via videoconference from Khartoum. Sudan has been struggling with its transition to a democratic government since the military overthrow of Al Bashir in 2019, following a mass uprising against three decades of his rule. The deal that Mr Hamdok signed with the military envisions an independent Cabinet of technocrats led by the prime minister until new elections are held. The government will still remain under military oversight, although Mr Hamdok claims he will have the power to appoint ministers. The deal also stipulates all political detainees arrested following the military takeover be released. So far, several ministers and politicians have been freed. The number of those still in detention remains unknown. “We have a situation now where we at least have an important step towards the restoration of the constitutional order,” said Mr Perthes. Since the takeover, protesters have repeatedly taken to the streets in some of the largest demonstrations in recent years. Sudanese security forces have cracked down on the rallies and killed more than 40 protesters so far, according to activist groups. Further measures need to be taken to prove the viability of the deal, said Mr Perthes, including the release of all detainees, the cessation of the use of violence against protesters and Mr Hamdok's full freedom to choose his Cabinet members. On Friday, hundreds rallied in Khartoum and other Sudanese provinces to demand a fully civilian government and protest the deal for the second straight day. It came after thousands protested on Thursday. One of the marches was led by Siddiq Al Mahdi, a leader of Sudan's prominent Umma Party, which has split with other pro-democratic groups over the deal to reinstate Mr Hamdok. He said protesters must remain steadfast in their calls for the generals to surrender power. Mr Al Mahdi was among those who were arrested during the military takeover and was let go in recent days. He refused the idea of further negotiations. “As things currently stand, there is no opportunity for things to move forward,” he said.