Mohamed Morsi, the first freely elected president in Egypt's history, is soon to take office under circumstances that are far from ideal. While Egypt's ruling military has conceded his victory over its preferred candidate in the presidential runoff election, Ahmed Shafiq, the generals who have been running the country show no sign of being ready to give up power. Last week they issued a decree stripping the president's office of its authority over the budget, national security and most domestic matters. Meanwhile, the parliament led by Mr. Morsi's allies in the Muslim Brotherhood-backed Freedom and Justice Party was declared invalid by the country's highest court, leaving the president-elect to largely fend for himself at the head of a toothless civilian government with little power to enact the reforms it promised.
Despite Egyptians' euphoria over the ouster of former dictator Hosni Mubarak last year, it should come as no surprise that the country's transition to democracy has been halting and beset by challenges. That was probably inevitable given the 30-year legacy of autocratic rule under Mr. Mubarak that brutally suppressed political opponents and stifled civil society. Yet Mr. Morsi's victory also represents a historic opportunity for the Egyptian people, if he can take advantage of it. Among the challenges he will have to overcome in addition to the generals' grab for power are finding ways to fix the country's sputtering economy and corrupt bureaucracy and, perhaps most important, to convince the 48.3 percent of Egyptians who voted for his opponent that he can represent more than just the narrow ideology of the Muslim Brotherhood.
To his credit, Mr. Morsi has shown himself willing to reach out beyond his Islamist base. In his victory speech Sunday, he portrayed himself as the leader of all Egyptians and pledged to protect the rights of women and religious minorities. To show his independence from the Brotherhood, he resigned his long-standing membership in the group. And though he had some conciliatory words for the military — which he called a "love in my heart that only God knows" — he also challenged the generals by refusing to be sworn into office unless he could take the oath in front of the members of parliament who had just been dismissed.
Whether Mr. Morsi can persuade the generals to rescind the order disbanding parliament may be the first real test of his leadership. And he can't expect to do it alone. He will need broad support not only from his base in the Brotherhood-backed Freedom and Justice Party but also from the liberal and secular parties that helped spark Egypt's democratic revolution a year ago.
One can envision an arrangement under which a broad-based coalition led by the Brotherhood emerges as a counterweight and check on the military's powers. Still, it's not clear whether Mr. Morsi, an American-trained engineer who has yet to fully define himself to voters, possesses the political skills needed to pull off such an accommodation. Promises to unite the nation won't mean much without actions to back them up, and the Brotherhood has already reneged on many of the promises it made before the elections, including one not to run its own candidate for president. Egyptians who wonder whether Mr. Morsi will go back on his word on other issues are right to be skeptical.
The U.S. can help by pressing Egypt's generals to make good on their earlier promise to transfer power to a civilian government. It seems likely that despite the military's apparent attempt to hijack the democratic process last week, its eventual acquiescence in Mr. Morsi's victory on Sunday was at least in part due to behind-the-scenes pressure from the Obama administration. The U.S. needs to keep up the pressure, but it must do so in support of the kind of government the people of Egypt want, not necessarily the one we would select.
Because democracy is an inherently messy process with little precedent in the region, there is probably no way to guarantee that an Egyptian government unfriendly to the U.S. and its allies will never come to power. Mr. Morsi, for example, has already suggested that Egypt and Iran could benefit from closer ties — a statement that surely gave pause to officials in Washington, Tel Aviv and Brussels.
It's virtually inevitable that a democratic Egypt will have interests that don't exactly coincide with those of the U.S. The country is just beginning a long process toward what one hopes will be a stable, democratic state at peace with its neighbors in the heart of the Arab Middle East.
Such a situation would be unprecedented and well worth the risks of encouraging Egyptian self-rule, if only because the lessons of history show that democracies rarely make war on each other. If Egypt's democratic revolution succeeded along the lines of, say, Turkey, where a moderate Islamist government coexists alongside a secular military that takes no direct role in politics, the halting transition to democracy that had its roots a year ago in Cairo'sTahrir Square could serve as a model for peaceful change throughout the region.