With the uncertainty that hangs over the outcome of Egypt's uprising, everyone is looking for clues in the tea leaves of other such upheavals.

Will it all fall apart as it did in China after Tiananmen Square in 1989? Or will it look more like the Iranian Revolution that brought the mullahs to power a decade earlier?

Or perhaps Eastern Europe after the fall of the Berlin Wall?

Of all these and other events that have made the last three decades a period of great upheavals, the Iran comparison probably provides us — in both its similarities and differences — with the best clue to Egypt's future.

mubarak-306-172-rtxq7ou

Former Egyptian president Hosni Mubarak: he created a generation of educated young Egyptians who became his undoing. (Reuters)

Not just because both Iran and Egypt are in the Middle East. If anything, it is because they are so different from all the other countries in the region that are experiencing similar unrest right now.

Where countries such as Iraq, Jordan and Lebanon were artificially created less than a century ago by British and French colonial bureaucrats out of the ruins of the Ottoman Empire, Egypt and Iran have a continuous history of civilizations that go back thousands of years.

And where Iraqis and Lebanese are split into a hodgepodge of feuding ethnic and religious groups, Egyptians and Iranians are united by a strong sense of their own nationalism.

Both, though, suffer from a split in their collective psyches between their feelings of nationalist pride and the pull of religious faith that drives their politics.

The two countries also share one more thing: the spread of education under both the late Shah Reza Pahlavi of Iran and Egypt's former president, Hosni Mubarak.

In both cases, the widening access to schooling played a crucial role in their respective downfalls.

As more and more young people were educated, their expectations and self-confidence grew.

In the process, they acquired an awareness of the failings of their society that made them determined to bring about change.

Don't overlook the differences

For all the similarities, though, there are also huge differences between these two countries.

The first is that while the Iranians are Shia Muslims, the vast majority of Egyptians are Sunnis.

Religion can play a more dominant role in Shia societies. Sunnis consider their relationship with God direct and imams are generally seen only as prayer leaders.

The Shia, on the other hand, have a hierarchical structure and their imams are considered community leaders.

That distinction can leave Sunni societies with a greater separation between mosque and state and makes it less likely that Egypt's Muslim Brotherhood would ever play as important a role there as the mullahs do in Iran.

There is another important difference between the two societies: Iranians tend to be more belligerent in their politics than Egyptians.

In Cairo these past weeks, the protesters called for Mubarak's resignation, not his head.

In Tehran, by contrast, in the demonstrations that erupted there in the wake of Mubarak's ouster, both sides wanted heads to roll.

The anti-government protesters called for the death of President Mahmoud Ahmadinejad while lawmakers demanded that the two main opposition leaders be arrested and executed.

Power corrupts

The biggest difference, though, is that while the Egyptian uprising has been leaderless, the Iranian Revolution was kick-started by a mullah, the late Ayatollah Ruhollah Khomeini, who eventually took over the country.

iran-revolution-306-rtr2a2z

Iranian President Mahmoud Ahmadinejad, beneath an image of the founder of the Islamic Republic, Ayatollah Ruhollah Khomeini in February 2010.(Caren Firouz/Reuters)

Still, at the beginning of the changes in Iran it didn't look as if Khomeini was going to take charge himself.

When I interviewed the Ayatollah during his exile in France, he ruled himself out as head of the Islamic republic he wanted to install.

He said he had no political ambition but declined to name anyone else as leader of the new regime. "There are many competent people."

Sitting next to him as we spoke was Sadegh Ghotbzadeh, one of a group of Western-educated Khomeini aides who were expected to run the post-Shah regime.

Ghotbzadeh, who had studied in Canada, was, indeed, appointed foreign minister.

But he became increasingly disillusioned and defiant as the Ayatollah, whom he had revered as a father, imposed his iron-fisted theocratic rule.

The Ayatollah reacted by having Ghotbzadeh put in front of a firing squad and shot.

No pharaohs need apply

In end, Khomeini, the man who overthrew a shah, grew to be more autocratic than the regime he replaced. And Iran is tightly ruled by mullahs to this day.

The Khomeini phenomenon illustrates the dilemma that confronts the Egyptian opposition.

The lack of a dynamic leader may end up stunting their revolutionary movement. But having one has its own dangers.

All too often, successful revolutionary leaders, once they taste power, turn out to be even more despotic than their ousted predecessors.

From the Reign of Terror in the French Revolution, to Vladimir Lenin, Mao Zedong, Khomeini and Zimbabwe's Robert Mugabe, there is a long line of liberators who morphed into tyrants.

Yet without a leader who personifies the aspirations of the Egyptian people, their hopes could all too easily be buried, as has so much in that country's history, under its ever shifting desert sands.

And Egypt could end up once again with yet another modern reincarnation of the pharaohs, a military ruler.

What Egypt needs now is spelled out in the Old Testament. The Book of Genesis urges a search for "a man of wisdom and good sense and put him in authority over the land of Egypt."

The man they were looking for then was not — nor surely should he be now nearly 4,000 years later — a pharaoh.