Sudan’s military Sunday reinstated deposed Prime Minister Abdalla Hamdok to lead a civilian government of technocrats after weeks of deadly unrest triggered by his overthrow. Civilian and military leaders said government officials and politicians arrested since the coup in late October will be released as part of the deal between the military and political parties, including the largest Umma Party. Hamdok will lead an independent technocratic Cabinet, the officials said. They said the United Nations, the United States and others played “crucial roles” in crafting the agreement. The coup had drawn international criticism, with the U.S., its allies and the U.N. condemning attacks on anti-coup protesters. As the agreement became known in Khartoum, the capital, security forces fired tear gas to disperse protesters as they approached the presidential palace. Shortly after the pact was signed, some began shouting, "Hamdok has sold the revolution." Hamdok said he had agreed to the deal to stop the bloodshed. "Sudanese blood is precious; let us stop the bloodshed and direct the youth's energy into building and development," he said. The U.N. Integrated Transition Assistance Mission in Sudan welcomed the recent developments. “We stress the need to protect the constitutional order to safeguard the basic freedoms of political action, freedom of speech, and peaceful assembly. The transition partners will need to urgently address unresolved issues to complete the political transition in an inclusive manner, with respect for human rights and the rule of law,” a UNITAMS statement said. “We call on all parties to the political process in Sudan to include the voices of the youth to address the demands of the Sudanese people. Women’s meaningful participation and the advancement of their hard-earned rights and role in the democratic transition must be maintained.” The civilian coalition that had shared power with the military said it was opposed to talks with the “putschists" and called for protests to continue. Resistance committees that had been organizing protests also rejected the new deal with the military. The Forces of Freedom and Change (FFC) civilian coalition, which had been sharing power with the military, said it did not recognize any agreement with the armed forces. "We affirm our clear and previously announced position: no negotiation and no partnership and no legitimacy for the putschists," the FFC said in a statement. Hamdok had been under house arrest since the military seized power on Oct. 25. His ouster derailed a transition toward democracy after the overthrow of Omar al-Bashir and his Islamist government in 2019 that ended his three decades of autocratic rule. The coup triggered mass demonstrations against the military, with medics aligned with the protest movement saying that security forces had killed 40 civilians in the violence. Some information in this report came from Reuters and the Associated Press.