The discredited, allegedly corrupt and certainly harsh, repressive and authoritarian tyrant was allowed to stay on like a bird in a gilded cage, a prisoner in his own palace. He didn’t even seem to be fully aware that he’d suddenly become ancient history.

A bright, new, idealistic democratic coalition had taken power in the ancient Middle Eastern capital that had proudly led the region for so many centuries. It was dedicated to peace, democracy and progress. The Americans and the British in particular had welcomed its sudden emergence as proof that liberal democracy and the best kind of modernization were coming to the region at last.

Cairo in 2011? Yes of course. But it was also Constantinople, today known as Istanbul, the capital of the ancient Ottoman Empire, in 1911 — three years after the Committee of Union and Progress (CUP) led by Enver Pasha had taken power with the support of hundreds of thousands of street protestors.

Enver then sounded very much like Nobel Peace Prize winner Mohamed El-Baradei, the former Director General of the International Atomic Energy Agency, does today.

Enver pledged the coming of secular democracy and a new age of peace, cooperation, modernization and prosperity for the vast empire that in those days still directly ruled the territories covering what are now the modern nations of Israel, the Palestinian territories, Lebanon, Syria and Iraq.

He pledged protection of and cooperation with the large Christian communities of the old empire and the much smaller but still significant Jewish ones that were spread over the Ottoman-ruled lands.

Millions of inhabitants of the Empire embraced this vision. Muslims, Christians and Jews hugged each other and danced for joy in the streets of Constantinople after the Sultan-Caliph Abdul-Hamid II’s corrupt old dictatorship was toppled. To quote the English poet William Wordsworth’s reaction to the French Revolution of 1789 in his “Prelude”:

“Bliss was it in that dawn to be alive. But to be young was very heaven!”

It was all too good to be true.

Within another three years, by 1914, Enver and his CUP had rashly plunged their empire into World War I on the side of Germany and Austria-Hungary. Far from embracing Western free markets, globalization and tolerance, they catastrophically leapt in the opposite direction.

This does not mean that the apparently impending fall of President Hosni Mubarak in Egypt will inevitably lead to the same kind of unrepressed passions and wild energies that the disastrous CUP revolution of 1908 wrought in the Ottoman Empire. But it might.

The parallels between Cairo today and Constantinople a century ago are all too obvious and disturbing. Most disheartening of all is the persistent assumption that because millions of people want (or think that they want) a healthy, stable, secular democracy in their country, they will get it.

Significantly, extreme Islamic religious sentiments played virtually no part in the toppling of Caliph-Sultan Abdul Hamid II and in the setting up of the CUP regime. The genocide of the Armenians was driven not primarily by religious passions but by nationalist ones that had turned bitter and sour.

The CUP leaders quickly found after taking power in 1908 that sweeping away the repressions of the past and rapidly improving economic prospects and living conditions were a lot harder than they first thought.

They allowed themselves to be seduced by the rhetoric of anger and resentment against Western nations to distract their population from the new regime’s own failings. After that, the road to war and disaster was wide open and downhill all the way.

El-Baradei and his secular allies will face similar difficulties and frustrations, and similar temptations, if they succeed in taking over from the rapidly fading Mubarak.

The policy reversals and eventual fate of the CUP regime in Constantinople a century ago serves as a warning that the admirable popular desires for freedom and democracy can be derailed badly. As the American poet T.S. Eliot, a far more cautious individual than the young Wordsworth, famously warned in his classic poem “The Hollow Men”:

“Between the idea
And the reality
Between the motion
And the act
Falls the Shadow.”

The successors to President Mubarak in Egypt are going to have to confront that shadow, as Enver and his compatriots failed to do in Constantinople a century ago.