CAIRO — As three Egyptian cities defied President Mohamed Morsi’s attempt to quell the anarchy spreading through their streets, the nation’s top general warned Tuesday that the state itself was in danger of collapse if the feuding civilian leaders could not agree on a solution to restore order.

Thousands of residents poured into the streets of the three cities, protesting a 9 p.m. curfew with another night of chants against Mr. Morsi and assaults on the police.

The president appeared powerless to stop them: he had already granted the police extralegal powers to enforce the curfew and then called out the army as well. His allies in the Muslim Brotherhood and their opposition also proved ineffectual in the face of the crisis, each retreating to their corners, pointing fingers of blame.

The general’s warning punctuated a rash of violent protests across the country that has dramatized the near-collapse of the government’s authority. With the city of Port Said proclaiming its nominal independence, protesters demanded the resignation of Mr. Morsi, Egypt’s first freely elected president, while people across the country appeared convinced that taking to the streets in protests was the only means to get redress for their grievances.