Picture the scene: the people of an authoritarian state rise up. The streets of the capital are flooded by citizens and even after the military is called in, the protests do not stop. Finally, the president departs. Months later, more than a dozen candidates face the public in a democratic vote, the outcome of which no one can predict. One of the candidates is a former prime minister, the face of the previous regime. The people vote. And he wins.
What sounds like a prediction of the victory of Ahmed Shafiq in Egypt's presidential election is actually what happened in Kyrgyzstan in October last year, when the new president, Almazbek Atambayev, won power through the ballot box, the first Central Asian leader to do so.
The parallels with Egypt do not end there. Since Mr Atambayev came to power, he has presided over a newly elected parliament that is far more unruly that anything that has come before. He has also grappled with what will be a central question for Egypt, and remains a central question for all the Central Asian republics: the role of religion in public life.
This question was very much on the minds of delegates this week in Astana, the capital of neighbouring Kazakhstan, as religious leaders from all the world's major faiths gathered to affirm the importance of faith in public life.
"The removal of religion from the society also removes the values of the society," said one Christian participant at a round-table discussion, held in the impressively designed Palace of Peace and Reconciliation, a pyramid of glass and steel in the city centre. "The atheist societies of the 20th century failed and were swept away. Faith is a natural desire of a human being. Societies that do not recognise this are not realistic.
"They will fail as well."
This was a popular sentiment at the conference but expressed in a curious geographical setting. For with the exception of Kyrgyzstan, most Central Asian countries limit the expression of religion in public life, in some cases forcefully.
There are two reasons for this. The first is cultural: the Islam of "the stans" has historically been private and spiritual, nomadic in parts and in others, due to trade, tolerant and open. People are devout in private but few demonstrate outward signs of devotion. The beards and headscarves that signal devout Muslims in other parts of the world - indeed in neighbouring South Asia - are largely absent. A region that has historically been part of the very centre of the Islamic world has evolved its own traditions, and governments have no cause to fiddle with them.
In any case, the Central Asian countries are not monolithically Muslim. All have significant Muslim populations, but also have other faiths. Nestled in downtown Astana are a strikingly designed synagogue, a Russian Orthodox church and a Catholic one, all on the same road. A Central Asian leader who openly favoured one faith would quickly find unrest.
The second is security: this is a dangerous neighbourhood, a jumble of ethnicities and twisting borders, with the flashpoints of Iran, Afghanistan and Pakistan just beyond. Religion plays a serious role in the politics of all those countries, with not always stable results.
Moreover, some of the same political trends can be detected in these former Soviet republics, which is why these governments watch Islamic groups closely. It is natural for them to suppose that, were there more religion in public life, then they would look more like their neighbours.
Central Asian countries have nervously watched the situation in Afghanistan, which shares long, porous borders with three of the five "stans". At least three have had attacks linked to militant Islam. If these Russian-leaning governments dislike the extensive US presence, they fear the departure of American troops from Afghanistan and the region more.
Which way, then, to swing on religion in public life?
In 2003, an International Crisis Group report on radical Islam in Central Asia concluded that a more open political system would allow religious actors public space to express their ideas, allowing an open discussion on religion in public life and leading to greater cohesion. So far, however, that trend has been resisted.
Today the discussion is heading the other way in Egypt and other post-Arab Spring countries, where Islamists have made significant political gains.
For too long, religious movements were held at bay and their ability to offer policy solutions to the population circumscribed.
Curiously, this helped Islamists by allowing them to declare Islam the solution without offering the details. The hope is that, once in power, Islamists will find they have to be responsive to their people, who want more action on schools and jobs and less on faith and morality. The essence to rebuilding Egypt rests with reforming the economy, and that will require good politics and stability: if religious actors can provide that, runs the thinking, all the better.
In Central Asia, the results of going the other way have been mixed, at best. The democratic experiment in Kyrgyzstan has been unruly: elements of religion are more of a factor in public life than ever before.
The power of religious groups - in particular Tablighi Jamaat, a revivalist Islamic group that has been banned in every other Central Asian country - is growing; many are publicly asserting their own brands of Islam.
The thinking of the Kyrgyz government seems to be that, if religion in public life is expanded, the militant strain will fade away, leading to greater stability. That may yet happen but it hasn't happened yet.
By contrast, next door, the tighter hand of Kazakhstan has led to a huge leap forward in wealth: it is now a middle-income country, easily the most dynamic economy in the region. That boom has been fuelled by huge oil and gas reserves, but perhaps also by a lack of friction, with little political and religious expression.
In Islam Without A Veil: Kazakhstan's Path of Moderation, the journalist Claude Salhani writes that this is a deliberate strategy, to focus on economic growth while keeping the society stable.
"Kazakhstan, due to its geographic location, is nearly 50 per cent surrounded by Muslim countries that either have a strong Islamic presence or where Takfiris [those who accuse others of being nonbelievers] tend to be active," he writes.
"Kazakhstan, much like other countries in the region, has much invested in seeing this tension disappear so that it can get on with the business of making business."
This will also be the first task for Egypt. Even the Islamists, for all the talk of their newly elected parliamentarians about social issues, understand this. Regaining lost tourism and investor confidence, reducing corruption and creating jobs will be essential tasks. Legislating on moral issues will need to take a back seat.
But how to make that tension disappear is the central question that will face the new Egyptian president. There are costs either way. Authoritarian control inevitably stifles creativity and risk-taking, as well as increasing corruption. Too much religion can be unruly.
When Egyptians go back to the polls to elect a new president, they will face these same questions: stick with the firm hand of the military, or offer the Islamists a greater role in their public life. There are no easy answers from Central Asia, except the least helpful: too much of either is bad.
falyafai@thenational.ae
On Twitter @FaisalAlYafai??????