CAIRO — The protest outside Sudan’s military headquarters felt more like a counterculture summer festival than a revolution. A famous Sudanese musician, using a car as his stage, stroked his violin. Sufi Muslims wafted about in colorful robes, mixing with people singing Christian hymns.

Some people brought their children to experience the moment and savor the euphoria of a remarkable achievement: Last week the protesters succeeded where numerous armed revolts failed and ousted the despised autocrat, President Omar Hassan al-Bashir, after 30 years of his grinding rule.

But inside the gates of the military headquarters, Mr. al-Bashir’s stalwarts are still in charge. Hard-bitten men synonymous with war and corruption, the generals are engaging in delicate talks with the hitherto unknown leaders of this youthful and inchoate uprising.

But neither side seems sure who is ally or enemy, and distrust abounds — especially among protesters who fear the generals will ultimately cheat them of their victory by thwarting a promised return to civilian rule.