The passions fueling Egypt's political turbulence arose directly from the "Arab Spring" of 2011, but they have deeper roots in a decades-long struggle over the nation's identity between two authoritarian forces — Islamists and a secular military state.
Egypt won its independence from Britain after a 1952 revolution by army officers led by Gamal Abdel Nasser. From the start, the military was set against the Muslim Brotherhood, a growing and at times violent underground Islamist movement. Strong in the provinces and among professionals, the Brotherhood espoused sharia, or Islamic law, and went so far as to attempt political assassinations to wear down the military-backed government.
The Brotherhood's vision inspired both moderate Islamist groups and terrorist organizations across the region. It renounced violence decades ago and concentrated on social and religious programs, but the group was both co-opted and persecuted by successive military leaders who regarded it as a threat to the westward-leaning secular state they envisioned.
The organization's bitterness simmered through six decades as military men ran the country, until a popular uprising overthrew President Hosni Mubarak in 2011. The army quickly seized control, but the Brotherhood began a political ascendancy that culminated with the election last year of President Mohamed Morsi, the nation's first Islamist leader.
The young protesters and opposition figures who led the revolt against Mubarak were outflanked by the Brotherhood and unceremoniously sidelined by political naivete, conflicting visions and lack of organization. That left the country's fate in the hands of the Islamists and the military. Morsi began accumulating power, ignoring court decisions against his authority, pushing through an Islamist-backed constitution and referring to his opponents as "thugs."
In perhaps the most brazen move of his tenure, Morsi, with the help of younger officers, purged the military of top commanders loyal to Mubarak, including Field Marshal Mohamed Hussein Tantawi. The move gave the Islamist leader a narrow space to negotiate a new relationship with the officers, notably Morsi's new armed forces chief of staff, Gen. Abdel Fattah Sisi.
But the state was falling apart. Foreign reserves plummeted, the inflation rate soared, tourism dwindled, power outages spread, gas lines grew and poverty deepened. The Brotherhood was once respected as the most potent — and brave — opposition to Mubarak's police state. It provided services to the poor and, with education and medical programs, bridged the failings of the state in the provinces. But it had never governed.
The military grew restless as protests and riots spread, further threatening the economy and even the shipping lanes of the Suez Canal. Morsi placated the army by granting it wide autonomy in the new constitution and promising not to interfere with the parallel business empire the military brass had created for itself.
The Brotherhood had inherited a dysfunctional, corrupt state. But the world's largest Islamist organization could not transcend its authoritarian instincts and lost the ability to deal with multiplying crises. Morsi accused remnants of the Mubarak administration, including businesspeople and officials in the courts and security forces, of instigating street unrest and sabotaging his government.
There was a degree of truth in that, but Morsi's constant claims of palace intrigue gave the whiff of paranoia and further highlighted his government's inability to solve the nation's many ills. Always hovering in the background was the specter of the old guard, epitomized by Mubarak, who glowered behind sunglasses as he was wheeled into court on charges of murder and other crimes.
Morsi had survived many protests and labor strikes, but the June 30 anniversary of his inauguration brought another groundswell against him. A new youth movement known as Rebel energized the opposition, and claimed to have collected 22 million signatures calling for Morsi's resignation.
On Sunday, millions of anti-Morsi protesters and tens of thousands of his supporters held rival rallies across the country. The size of the demonstrations stunned the Brotherhood, and provided a pretext for the army to move against Morsi under the guise that it was carrying out the will of the people.
The change in atmosphere was epic. Morsi was caricatured as an Islamist version of Mubarak, an uncharismatic, tone-deaf autocrat who alienated the youth and mistook bluster for leadership. Gradually and then very suddenly, the Brotherhood's blend of religion and politics began to buckle.
"I don't think there is a future for the Muslim Brotherhood," said Abdelgelil Mostafa, a political analyst and opposition figure. "They're in the midst of political suicide.... These people on the streets will not go home until this dark era ends."
The opposition's embracing of the army, which was condemned for human rights abuses and civil liberty restrictions during its rule, signaled how much the Brotherhood was despised. Opposition figures such as Nobel laureate Mohamed ElBaradei, who once vilified army control, were now asking the generals to reenter the scene in a moment of opportunity for both.
"Every minute that passes without the armed forces' intervention to perform its duties and protect the lives of Egyptians will waste more blood, especially since the person in the presidential position has lost his legitimacy and eligibility, and maybe even his mind," ElBaradei said.
The military coup that pushed Morsi out leaves Egypt in a new and dangerous phase. Opposition political leaders have proved politically inept, and even they don't have the support of much of the street, which more than the ballot box these days is defining Egypt's democracy.
The military — still the most revered of Egypt's troubled institutions — risks going from hero to villain unless it can quickly forge political stability. It is also likely to face retaliation by militant and ultraconservative Salafi groups, some armed with weapons smuggled from Libya, which are angry over the army's pressure on Egypt's first freely elected president.
Morsi has been pushed aside in a swift and dramatic fall from grace. For many Islamists, his presidency marked the first step toward transforming Egypt into an Islamic state. The Brotherhood, thousands of whose members were arrested and tortured by Mubarak, will not relinquish that dream easily.
"We sacrifice for our country, and I am the first to sacrifice," Morsi told the nation early Wednesday. "If the cost of legitimacy is my life, I will pay it gladly."