Updated

The dramatic attacks on the U.S. embassy in Cairo capped off a summer in which Egypt has already seen its greatest political developments in 150 years. The first democratic elections since 1950 brought former Muslim Brotherhood member Mohamed Morsi to power, and the protests over a video denigrating Islam now confront him with the challenge of preserving his relations with the United States, while being true to his Islamist roots.

For all the progress Egypt has made, its people are still locked in a totalitarian mindset, and cannot understand that freedom of expression -- including the freedom to express offensive and even sacrilegious sentiments -- is a cornerstone of life in most democracies. Americans have long since grown accustomed to being offended by public statements, shaking their heads, and walking away. For Egyptians, and many other Arabs as well, decades of life under dictatorship have led to the expectation that governments are all-powerful -- and that they should be.

As Morsi responds to this crisis, the world will see whether he supports a government that respects freedom of speech, and protects minority rights even as it enshrines majority rule.

For months now, Morsi has been maneuvering skillfully, capitalizing on a series of missteps by Egypt’s provisional military rulers, and ending up with more power than any ruler since the 1860s. At this point, only the country’s courts and a disorganized majority of secularists stand between him and an imperial presidency.

[pullquote]

After a popular revolution ousted Hosni Mubarak in February 2011, the Supreme Council of the Armed Forces took power, and instead of drafting a constitution imposing limitations on the power of the government, it pushed for early elections.

In ensuring that Egypt’s politics remained a winner-take-all political battle, the generals virtually guaranteed lasting squabbles in which no side had any incentive to back down, and civil war was never out of the question.

Only in recent months have the generals realized that the Brotherhood had much greater ambitions than it professed. The Brotherhood dominated the constituent assembly to draft the new constitution, and ultimately broke its promise not to run a candidate for president.

On June 14, only days before the end of the presidential elections, Egypt’s Supreme Constitutional Court dissolved parliament on grounds that the law under which its members came to power was unconstitutional. The ruling also threatened members of the constituent assembly drafting the new constitution, who were elected by members of what had been ruled an illegitimate parliament.

Morsi tried to restore the invalidated parliament to office and strip the Supreme Council of the Armed Forces of its powers, but the Supreme Court and the rest of the judiciary stood fast, and eventually forced Morsi to abide by the law.

Before long, however, an external threat came to Morsi’s rescue. On August 5, a group of Islamist terrorists attacked Egypt’s border with Israel, killing 16 Egyptian policemen. The attack sparked a popular outcry against the Brotherhood’s open-border policy toward Gaza, putting Morsi in an awkward position.

Morsi toughened his stance, sending bulldozers to close down the smuggling tunnels that deliver arms and commodities to Hamas. The army, meanwhile, had no choice but to move troops backed by tanks and helicopters into the Sinai, launching an unprecedented military assault on terrorist strongholds.

Though Israel wants to see Egypt restore order in Sinai, it nonetheless expressed its concern over the presence of heavy military equipment there, which violates the peace treaty the countries signed in 1979. The issue will undoubtedly require delicate negotiations.

In crushing terrorists who had attacked Egyptians, even though they were fellow Islamists, Morsi showed that Egyptian national security trumps ideological associations. For the first time in the history of Arab-Israeli relations, Israel is also dealing with another democratically-elected government.

Meanwhile, Morsi has managed a master stroke: marshaling the younger, more ambitious military officers -- who are close to 60 years old, themselves -- to help him force aging SCAF leader Field Marshal Hussein Tantawi and the rest of the army’s high command into early retirement, and granting himself all their political powers.

With so much responsibility, Morsi has an unprecedented opportunity to shape Egypt’s destiny. So long as he doesn’t clash with the military over its budget autonomy, or its enormous industrial complex, only the judiciary and civil society groups can check his powers.

The uncharismatic man few thought would become president has proven an exceptional politician. After becoming a last-minute presidential candidate, Morsi won a narrow victory, and he has now consolidated his power more fully than any man who came before.

But can Morsi both keep the peace and deliver on the promise of the revolution that toppled Mubarak? Will he reverse Egypt’s economic freefall, and ensure that it drafts a truly democratic constitution? Or will he rule with an iron fist and build another oppressive regime?