Earlier this year, most analysts in Egypt assessed Field Marshal Hussein Tantawi to be the key figure in that country's politics and President Mohamed Morsi to be a lightweight. Mr. Morsi fired Field Marshal Tantawi on Aug. 12. This matters because Field Marshal Tantawi would have kept the country out of Islamist hands, while Mr. Morsi is speedily moving the country in the direction of applying Islamic law. If Mr. Morsi succeeds at this, the result will have major negative implications for America's standing in the region.
How did this happen?
Field Marshal Tantawi, then the effective ruler of Egypt, had handpicked Mr. Morsi for president, seeing him as the safest option, someone who could be manipulated or (if necessary) replaced. Toward this end, Field Marshal Tantawi instructed the Supreme Constitutional Court (SCC) to approve Mr. Morsi as a candidate despite his arrest on Jan. 27, 2011, for "treason and espionage," despite his time in prison, and despite the SCC having excluded other imprisoned Muslim Brotherhood candidates, especially the rich, charismatic and visionary Khairat El-Shater. Field Marshal Tantawi wanted the obscure, inelegant and epileptic Mr. Morsi to run for president because Mr. Shater was too dangerous and another Muslim Brotherhood candidate, Abdel Moneim Aboul Fettouh, was too popular.
Sometime after Mr. Morsi became president on June 30, Field Marshal Tantawi openly signaled his intent to overthrow him via a mass demonstration to take place on Aug. 24. His mouthpiece, Tawfik Okasha, openly encouraged a military coup against Mr. Morsi. But Mr. Morsi acted first and took several steps on Aug. 12: He annulled the constitutional declaration limiting his power, dismissed Field Marshal Tantawi and replaced him with Abdel Fattah al-Sissi, head of military intelligence.
Mr. Morsi, in brief, pre-empted the impending military coup d'etat against him. Tarek al-Zomor, a leading jihadi and Morsi supporter, admitted that "choosing Sissi to replace Tantawi was to stop a coup," publicly acknowledging Mr. Morsi's urgent need to act before Aug. 24. Hamdi Kandil, one of Egypt's most prominent journalists, rightly characterized Mr. Morsi's act as "a civilian coup."
How did Mr. Morsi pull it off? How did the lamb slaughter the butcher? Why did so many analysts not see this coming?
They missed one hidden factor: Muslim Brotherhood-oriented military officers turn out to have been far more numerous and powerful than previously realized. They knew about the Aug. 24 plot and helped Mr. Morsi beat it. If it was long apparent that some officers had a sympathetic outlook toward the Brotherhood, the extent of their network has only just come out in the three months since the coup.
For example, we now know that Maj. Gen. Abbas Mekheimar, the army officer assigned to oversee the purge of officers with Muslim Brotherhood or other Islamist affiliations, himself is aligned with the Muslim Brotherhood or perhaps a member of it. As for Mr. Sissi, while the Muslim Brotherhood denies his direct membership, one of its leaders says he belongs to its informal "family" -- which makes sense, seeing that high-ranking public figures best advance its agenda when not formal members. His position as head of military intelligence gave him access to information about Field Marshal Tantawi's planned Aug. 24 coup. Historian Ali Al-Ashmawi found that Mr. Sissi tracked military officials loyal to Field Marshal Tantawi and had them discharged.
In retrospect, this network should not be a great surprise, for it has a precedent: The Muslim Brotherhood infiltrated the military in the 1940s, standing behind the Free Officers movement that overthrew King Farouq in 1952. After having been shut out in the period 1954 through 1974, the Muslim Brotherhood then rebuilt its network of officers in ways invisible and unknown to outside observers, including ourselves. One top Muslim Brotherhood figure, Tharwat al-Kharabawi, now acknowledges that some of the organization's members "became high-ranking leaders in the military."
Where does this leave matters? Field Marshal Tantawi and company are safely pensioned off, and (unlike Hosni Mubarak) are not going to jail. Mr. Sissi's military has retreated to roughly the same position that Field Marshal Tantawi's military occupied before Mr. Mubarak's overthrow in February 2011 -- which is to say it is allied with the president and following his leadership without being fully subordinate to him. It retains control over its own budget, its promotions and dismissals, and its economic empire. But the military leadership lost the direct political power that it enjoyed in 2011-12.
Mr. Morsi's future is far from assured. Not only does he face competing factions of Islamists, but Egypt faces a terrible economic crisis. Mr. Morsi's power today unquestionably brings major short-term benefits for him and the Muslim Brotherhood, but in the long term, it likely will discredit the organization's rule.
In short, following 30 years of stasis under Mr. Mubarak, Egypt's political drama has just begun.
Daniel Pipes (DanielPipes.org) is president of the Middle East Forum, where Cynthia Farahat is an associate fellow.