The occasion was marked by a televised ceremony in the presidential palace, with the prime minister appearing alongside Lieutenant General Abdel Fattah al-Burhan, the army chief who ousted him, and at one point, detained him in his own residence.
The two have signed a 14-point deal they see as an important step forward. It included commitments to release all political detainees and to preserve the nation’s path to democracy.
The hope was that Mr. Hamdok’s return to power could put an end to the protests that followed the coup and the brutal reprisals by the security forces. But that did not happen.
Sudan’s largest political organization, the Umma Party, rejected the deal. The same goes for the Forces for Freedom and Change, a civilian coalition that shared power with the military until the coup.
The deal was also not well received by ordinary citizens. Mocking protesters gathered outside the presidential palace in Khartoum and elsewhere in the country, including Sunday, the day Hamdok resigned. They demanded that the putschists be prosecuted.
Mr. Hamdok, in particular, was accused of providing a fig leaf that allowed the military to continue to dominate the political arena.
Security officials responded to the protests with heavy force, firing tear gas and firing rubber and live ammunition, activists and protesters said. Hundreds of people have been injured across the country.