Editor's note: Mohammed Ayoob is University Distinguished Professor Emeritus of International Relations, Michigan State University, and Adjunct Scholar, Institute for Social Policy and Understanding. His edited volume, "Assessing the War on Terror" will be published later this year, and his book, "Will the Middle East Implode?" is scheduled for publication in early 2014.
(CNN) -- In a move likely to have long-lasting consequences, the Egyptian military has ousted President Mohamed Morsy, suspended the constitution and appointed the head of the constitutional court, an implacable foe of the president, as interim head of state.
This act could well foretell an end of the fledgling democratic experiment in the most populous Arab country which, by overthrowing its long-term dictator just a couple years ago, had inspired democracy movements around the Arab world.
Morsy's gravest mistakes have resulted from a deliberate policy of accommodation and not, as is commonly believed, confrontation. He has allowed the military to retain its corporate autonomy and remain beyond civilian control. Furthermore, he included in his cabinet a large number of non-Muslim Brotherhood figures who jumped ship very quickly Monday when the going got tough, thus portraying the image that the government was on the verge of collapse.
In hindsight, it appears that he should have brought the military to heel soon after he assumed power and was at the height of his popularity, just as the military was at its lowest point in public esteem. He should have appointed a civilian defense minister, preferably from the Brotherhood and firmly brought the military under civilian control.
This may well have led to a confrontation with the military brass, but Morsy had a much better chance of winning this fight a year ago than he did now. If he had won that fight he would have been in control of the military as the constitutional head of government. If he had lost, the military's real intentions would have been laid bare quickly and the farce of military neutrality put on public display.
Furthermore, just like other democratically elected chief executives who function within party systems he should have exercised his right to induct into his cabinet almost exclusively members of the Muslim Brotherhood, thus ensuring the loyalty of the executive branch. In particular, he should have appointed a Muslim Brother as the minister of the interior in charge of the police, with orders to quickly root out those remnants of the Mubarak regime who continued to hold office while conspiring against the elected government.
Morsy paid a heavy price for this last mistake, with the police refusing to protect the Brotherhood's offices in Cairo and elsewhere when anti-Morsy demonstrators began to burn and loot the party's headquarters. To add insult to injury, Morsy's minister of the interior announced in advance of the protests that the police would not provide protection to the Brotherhood's offices.
The military is once again projecting its image as the facilitator for a transition to civilian rule as it did at the time of Mubarak's overthrow. But, democracy in the true sense of the term will remain a mirage as long as the military is seen as the agent for political transition. For, the only transition that the military brass likes is the transition of power to itself. Everything else is but sound and fury, signifying nothing.
If the Egyptian military is allowed to get away with this unconstitutional act it may spell the end of democracy in Egypt for a long time to come. It will also be the last nail in the coffin of an Arab Spring already teetering on the edge of the grave with a bloody civil war raging in Syria, brutal suppression of democracy activists in Bahrain, and near-chaos in Libya and Yemen. One wonders how long Tunisia, which is also ruled by an Islamist party faced with street protests, will be able to hold out as a bastion of democracy.
Morsy's overthrow will also seriously erode the credibility of the moderate Islamists. The moderates had been winning the intra-Islamist battle on the issue of whether Islam and democracy are compatible and, more importantly, whether Islamist parties that come to power will be allowed to govern without hindrance by domestic and external forces opposed to them.
The Egyptian Brotherhood itself had undergone a remarkable transformation, with political pragmatism trumping ideological purity and leading to its internalization of the values of compromise and the political give and take that lies at the heart of democracy.
It is true that Morsy left himself open to charges, especially on issues relating to the status of women and the role of Sharia in Egyptian law, that he was pandering to some of the more extreme views of the Islamist constituency -- ultra-conservative Salafis as well as members of the Brotherhood. Nonetheless, his election was the crowning act in this drama signifying that the Islamist mainstream saw no contradiction in working within a democratic system and accepting the rules of the game while remaining true to its faith.
The major lesson that Islamists in the Middle East are likely to learn from this episode is that they will not be allowed to exercise power no matter how many compromises they make in both the domestic and foreign policy arenas. This is likely to push a substantial portion of mainstream Islamists into the arms of the extremists who reject democracy and ideological compromise.
A segment of this rejectionist camp is also not averse to taking up arms against the "system" that suppresses them as well as against its foreign supporters. It is almost certain that some elements among the disillusioned mainstream Islamists will decide to join this militant trend and resort to arms -- thus increasing the odds of this volatile region descending into greater anarchy and turmoil.
Follow @CNNOpinion on Twitter.
Join us at Facebook/CNNOpinion.
The opinions expressed in this commentary are solely those of Mohammed Ayoob.