CAIRO — The commander of the armed forces asked Egyptians on Wednesday to hold mass demonstrations that would give him a “mandate” to confront violence and terrorism, appealing to one side of Egypt’s sharply divided populace and raising the specter of broader unrest.

During a speech to recent military graduates, the commander, Gen. Abdul-Fattah el-Sisi, warned of forces taking the country into a “dark tunnel,” a clear reference to Islamist supporters of the deposed president, Mohamed Morsi, and he asked Egyptians to protest on Friday.

“I’m asking you to show the world,” he said. “If violence is sought, or terrorism is sought, the military and the police are authorized to confront this.”

The call for mass mobilization thrust the general into the center of Egypt’s contentious politics, raising questions about his ambitions while contradicting the military’s pledges to defer to civilian leaders after removing Mr. Morsi. His appeal also hinted at a broader crackdown against Islamists, whose leaders have already been detained.