The electoral victory of Egypt's radical Muslim Brotherhood, as former dictator Hosni Mubarak lies on his deathbed, marks the end of one era of Western wishful thinking about the Middle East while bringing a new era of self-delusion in its place.

Although Mr. Mubarak plundered his people, held sham elections and ignored growing Egyptian poverty and unemployment, the West spent decades treating him as a force for stability, even progress. U.S. President Barack Obama chose Mr. Mubarak's Cairo to deliver his address to the Muslim world in 2009. There was not a word of criticism in that speech about the suppression of dissent in Egypt. Mr. Obama and other Western leaders ignored appeals for help by imprisoned Egyptian dissidents.

Mr. Mubarak faced little international criticism for turning the Egypt-Israel peace agreement into a farce. Under his regime, there was virtually no Egyptian tourism to Israel or joint business ventures between Egyptians and Israelis. Egyptians who did visit Israel were subjected to harassment after returning home. The state-owned media was among the Arab world's most viciously anti-Jewish, promoting Holocaust denial and portraying Israel as the new Nazi Germany.

Story continues below advertisement

Still, however bitter Israelis felt toward Mr. Mubarak for betraying the spirit of peace, they sensed he was right when he warned that the most likely alternative to his rule wasn't democracy but radical Islam. And so Israelis watched last year's revolt with growing foreboding. While sympathetic to the young demonstrators in Tahrir Square, Israelis feared that those who would ultimately benefit from Mr. Mubarak's fall wouldn't be the brave democrats who led the revolution but the Islamists waiting patiently on the sidelines. Israelis warned that the Egyptian spring would likely resemble not the triumph of democracy in Prague, 1989, but the triumph of Islamism in Tehran, 1979.

Some Western commentators mocked those anxieties. Israelis were behaving like yesterday's men, they said. Mr. Obama's administration was reportedly furious with Israel for urging Washington not to abandon Mr. Mubarak entirely, but to ensure a transition of power that would give the democratic opposition time to organize.

As for the threat of the Muslim Brotherhood, some Western experts noted that it represents only a minority. Besides, the Brotherhood wasn't interested in ruling Egypt, only in taking its rightful place in the public sphere. After all, that is what the Brotherhood's leaders insisted.

Now that those assumptions have collapsed, some in the West seek signs of Muslim Brotherhood moderation. Governing will temper its ideology, according to the latest assurances. Besides, there are relative moderates in the Brotherhood.

Story continues below advertisement

Similar hopes were expressed when the Palestinian Islamist movement, Hamas, seized power in Gaza in 2007. But since then, Hamas's rule has become increasingly authoritarian. Internet cafés have been shut down or set on fire, opponents imprisoned and tortured.

Just recently, the spiritual head of the Muslim Brotherhood, Mohammed Badie, called the creation of Israel "the worst catastrophe ever to befall the peoples of the world" and urged Arab armies to confront Israel. Yet these and other incendiary statements tend to go underreported in the West.

According to the Iranian news agency, one of president-elect Mohammed Morsi's first policy statements after winning the election was expressing his intention for closer Egyptian-Iranian ties. Mr. Morsi's spokesman later denied it. All this still raises the terrifying possibility of a Sunni-Shiite Islamist alliance. The first Sunni Islamist movement to reach out to Iran was Hamas; now, rather than remain an aberration, Hamas could be a harbinger.

Western naiveté about the Middle East is hardly confined to Egypt.

Story continues below advertisement

Last year, I was part of a group of Israelis who met in Jerusalem with Massachusetts Senator John Kerry. Mr. Kerry had just come from Damascus with excellent news: Bashar al-Assad was ready for peace with Israel. When one of the participants mentioned that demonstrations had begun to challenge Mr. Assad's legitimacy, Mr. Kerry's response was: All the more reason to negotiate while he's still in power. In other words: Israel had the golden opportunity to give up the strategic Golan Heights to a dictator who might be deposed by a popular revolution, which might or might not recognize whatever peace agreement he signed.

That kind of wishful thinking has resulted in Western policy toward the Middle East that is strategically incoherent.

Consider the West's response to two recent crises in the Arab world. In the first case, the West actively intervened to help depose Libya's Moammar Gadhafi. As loathsome as Mr. Gadhafi was, he posed no strategic threat, having abandoned support for terrorism and a nuclear program.

The second case is Syria's Mr. Assad, who has committed far greater atrocities against his own people than Mr. Gadhafi did against his. Mr. Assad's fall would have historic strategic implications, weakening allies Iran and Hezbollah. Yet the West has remained inexplicably passive.

Story continues below advertisement

At this fateful moment of transition for the Middle East, the West needs clarity in assessing threat and opportunity. Whether dealing with the Muslim Brotherhood or negotiating with Iran over its nuclear program, the operative principle must be: No more illusions.

Yossi Klein Halevi is a fellow at the Shalom Hartman Institute in Jerusalem and a contributing editor to the New Republic.