That’s why it is essential that Egypt’s armed forces immediately end their arrests of Islamist leaders and open negotiations with them and secular politicians on a political settlement. Mr. Morsi’s followers are demanding that he be reinstated in office, under the constitution the military suspended. While the coup leaders are unlikely to accept that, they must offer the Muslim Brotherhood terms that will allow them to remain inside the political system. That means a commitment to new elections within months if not weeks, and freedom for the movement’s political party and media. Any changes to the constitution, which was ratified by two-thirds of voters in a referendum last December, should be the result of a consensus among political forces and a new referendum.

Most important, the armed forces must be willing to guarantee that the results of future elections will be accepted even if they lead to another Islamist victory. Some Egyptians appear to have convinced themselves that the Muslim Brotherhood no longer has popular support, but it, as well as more radical Islamist groups, has repeatedly surprised the Cairo elite with an ability to turn out voters. In contrast, Mohamed ElBaradei, the former diplomat chosen by the military to be prime minister, registered near the bottom of polls before last year’s presidential election and declined to run.