There was a time in Cairo, just a few months ago, when it was considered slightly outre to suggest that Egypt’s religious conservatives might take advantage of Hosni Mubarak’s demise to engineer their way into power.

We were told that battalions of tweeting secularists were steering this revolution, and that the people of Egypt did not want sharia, or Islamic law, to govern their lives. They simply wanted freedom. This was Selma on the Nile.

One night in a ragged, badly lit cafe just off the square, one of the revolution’s “Google kids” -- not an actual employee but someone who could plausibly be employed by Google - - explained to me how the Mubarak regime manipulated Western opinion. “They wanted you to believe that the only thing stopping the Muslim Brothers from taking over the whole country was them,” he said. “This is how they scared you. Then you gave them guns they used to kill us.”

Both statements were true. Mubarak did invoke the specter of Islamism to Western visitors; a dozen years ago he told me, “My people expect a firm hand. If we don’t lead strongly, they will turn to the mosque for leadership.” And the regime’s thugs did deploy American weaponry against the demonstrators in Tahrir Square and elsewhere in Egypt. This was America’s shame. It is also a shame -- a lesser shame, a shame of poor analysis--that the Arab Uprising went entirely unpredicted in Washington and elsewhere. To compound the shame, few people, even in the midst of the uprisings, forecast the rise of Islamist parties to power not only in Egypt but also in Tunisia, Morocco, Libya, and coming soon, in Syria, when the Assad regime finally falls.

Dignity and Respect

In many ways the Arab Uprising -- or Arab Awakening, or Arab Spring; freedom means we can call it what we want -- should thrill the American soul. Millions of Arabs, their fear of torture and persecution finally conquered by anger at the regimes that oppressed them, rose up and, in countless acts of astonishing bravery, defeated or are attempting to defeat the despots and the massive secret police apparatuses under their command. The protesters sought dignity and respect and the freedom to choose their own path, and these are things that resonate with Americans.

Then came a problem. It turns out Mubarak was right. The only thing standing between Egypt and the rise of fundamentalist Islam was … Mubarak. The path the Arab people seem to want, at least for the moment, is the path of Islam.

The big news out of Cairo late this fall was not the Muslim Brotherhood’s triumph in parliamentary elections, even though the Brotherhood-affiliated party took 37 percent of the popular vote. The main news was made by the more extreme Nour Party, which is affiliated with Egypt’s Salafists. The Salafists, who believe that the world should be made over to look as it did during the time of the Prophet Muhammad, took almost 25 percent of the popular vote. In other words, the majority of voters in the Arab world’s most populous country chose either a party whose motto is “Islam is the Solution” or a party that believes that medieval Arabia is an appropriate state model.

There have been two predictable Western responses to the rise of Islamism in Egypt and across the Arab world: panic and rationalization. Panic is self-explanatory: The Muslim Brotherhood and its more radical cousins are, generally speaking, anti-Western, anti-Semitic, hostile to Christians in their midst, and have a view of women that most Westerners find abhorrent. It is not difficult for creative minds to place the Muslim Brotherhood on a continuum that ends at al-Qaeda, even though al-Qaeda was created in part as a corrective to what Osama bin Laden & Co. viewed as the unforgivable moderation of the Brotherhood. The panic felt in some quarters is precisely what men such as Mubarak, Zine El Abidine Ben Ali in Tunisia, and even the late-stage Muammar Qaddafi in Libya hoped to cultivate in their Western interlocutors.

Rationalizing Fundamentalism

The other predictable response among Westerners has been to rationalize the rise of Muslim fundamentalism by arguing that the Muslim Brothers and even the Salafists are not the bogeymen we think they are. Scratch a Muslim Brother, the argument goes, and you’ll find the Middle Eastern analog of a European Christian Democrat. This argument elides the misogyny and anti-Semitism of Islamists, not to mention their embrace of various baroque and pathetic conspiracy theories, including the notion that the attacks of 9/11 were plotted by the Mossad or the CIA. On the other hand, the Egyptian Brothers no longer have to look to Iran to see how Islamists govern; they can look, and are looking, to Turkey, where the ruling AKP party has come closest to maintaining a commitment to traditional Islam without turning its back on the West or completely cutting off the oxygen to liberal-minded secularists.

A set of less predictable responses to the upheaval in the Middle East would include, at the outset, a strong dose of analytical humility. No one knows how these newly empowered Muslim political parties might govern. Never having governed before, the parties themselves don’t know. There are reasons for conditional anguish: The (now contracting) economy of Egypt can’t afford to be led by people who believe “Islam is the solution,” and it certainly can’t be brought into the 21st century by leaders who want to build a bridge to the 7th. But no one has yet offered compelling proof that the Brotherhood would break Egypt’s treaty obligations or press its views through violence.

Another less predictable response might come in the form of fatalism: What will happen in the Middle East is going to happen. The crisis in the region this year was, indirectly, of America’s making: On the advice of the camp of cynics known as foreign policy realists, successive U.S. Administrations believed that the best American policy in the Middle East was to make alliance with the most amenable Arab despots, who would ensure stability. Well, stability turned out to be chimerical. The Arab masses, less interested in geopolitical stability than in dignity and free expression, have rebutted the realist argument.

Military Hangs On

All this assumes Egypt’s brutal military will actually cede power to elected parties. Either way, the outcomes won’t be determined by the U.S. The people of the Arab world are going to spend the next 10 (or 20 or 30) years deciding for themselves how they wish to be governed. It will often be messy and unpleasant, but in the end, once they complete their experiments in theocratic rule (or revert back to other forms of authoritarianism), I’m reasonably sure (as an American optimist, rather than as a fatalist) that they will turn to a type of liberal democracy informed by faith, but without the intolerance associated with fundamentalism.

This is not to say the West must ignore the Arabs as they sort out the future. The U.S. still has the ability to shape certain outcomes -- the intervention in Libya is a case in point -- and protect those who need protecting. (The aggrieved Christians of Egypt spring to mind.) And the U.S. should work more assiduously to speed Assad’s downfall in Syria, which would leave America’s main nemesis in the Middle East--Iran--without an Arab friend. The uprisings offer opportunities for the U.S. None is greater than the chance to see the Arab world find its way to freedom, if we only have the patience and fortitude to watch as it detours through fundamentalism.

(Jeffrey Goldberg is a Bloomberg View columnist and a national correspondent for the Atlantic. The opinions expressed are his own. This article appears in the Dec. 26 issue of Bloomberg Businessweek.)

To contact the writer of this article: Jeffrey Goldberg at goldberg.atlantic@gmail.com.

To contact the editor responsible for this article: Timothy Lavin at tlavin1@bloomberg.net.