As Sudan’s military announced at lunchtime on Thursday that it had finally unseated President Omar Hassan al-Bashir, a brief burst of joy exploded outside the military headquarters in Khartoum where huge throngs of protesters had massed.

Nearly four months of protest, dozens of deaths at the hands of the security forces and endless chants of “revolution!” had finally come to this: the ouster of the despised leader who had ruled their vast country, plagued by famine and war, for 30 years.

But the euphoria quickly soured when the protesters realized who had replaced Mr. al-Bashir.

The somber man reading the speech on television was Lt. Gen. Awad Mohamed Ahmed Ibn Auf, the defense minister and a confidant of Mr. al-Bashir. General Ibn Auf, like Mr. al-Bashir, had been accused of perpetrating war crimes in Sudan’s western region of Darfur.

The protesters fell silent as he laid out his terms: the release of political prisoners, but also a two-year transition steered by a military council, the suspension of Sudan’s Constitution, the dissolution of government and curfews starting at 10 p.m. that night. Loud groans and lamentations rippled through the crowd, followed by a current of anger.