IN last month’s Saudi Arabian municipal elections, the nation’s first experiment in real democracy, many were worried because Islamic activists dominated their secular rivals. Indeed, we have seen a similar trend in Turkey, Morocco and Iraq in the last few years; and we can expect it in the coming Lebanese, Palestinian and Egyptian elections. Yet, while this Islamic trend can no longer be ignored, neither should it be a source of panic to Western policy makers and pundits.

Based on my 30 years of empirical investigation into these parties – including my observations of fellow inmates during the 14 months I spent in an Egyptian prison – I can testify to a significant evolution on the part of political Islam. In fact, I believe we may be witnessing the emergence of Muslim parties that are truly democratic, akin to the Christian Democrats in Western Europe after World War II.

To understand this evolution, one must look at how the Islamists rose to such prominence. Autocratic regimes in the Middle East have for decades allowed little public space to those who would build civil societies; no freedom of speech, assembly or association. The only space for people to congregate without harassment by the secret police was the mosque. Thus, unwittingly, the autocrats contributed to the growth of the theocrats, who became their mirror images.

Taking advantage of the rulers’ economic and political failures at home and their setbacks on battlefields, the theocrats made compelling cases for their own visions. And through their great efforts in providing services to the poor, they evolved first into de facto social workers and then into local politicians, eventually taking control of cities like Algiers and Oran in Algeria, and Istanbul and Ankara in Turkey.

Seen as efficient and uncorrupt, these Islamists began to gain in popularity even among secularists and won parliamentary pluralities in Algeria in 1991 and in Turkey 11 years later. (In Algeria the Islamists were not allowed to enjoy the fruits of their victory thanks to a Western-condoned military coup.) Today, some two-thirds of the estimated 1.4 billion Muslims in the world live under democratically elected governments in which Islamists are major players – with Indonesia, Bangladesh and Morocco joining Turkey as bright spots.

Clearly, on grounds of principle and pragmatism, Westerners should not be dismayed at the thought of allowing religious parties a role in the emerging political structures of the Arab world. For one thing, as citizens, Islamists are entitled to the same basic rights as others. It would therefore be hypocritical to call for democracy in these countries and at the same time to deny any groups wanting to peacefully contend for office.

Second, Islamists tend to be fairly well organized and popular. Yes, some have created armed wings to their movements, ostensibly to resist foreign occupation (Hezbollah in Lebanon, Islamic Jihad in Palestine) or in response to authoritarian regimes. But in all cases, a moderate, less-violent Islamist core exists. Excluding the religious parties from the political mainstream risks giving the upper hand to the armed factions at the expense of their more moderate centers.

Repression has had high costs. Where Islamist groups are denied access to political space, their cause takes on an aura of mythical martyrdom, and their abstract calls for a return to Islamic principles of governance are not put to the test. A phrase like “the meek are the inheritors of the earth” resonates with the masses, though it is empty of any practical content. As long as these groups don’t have to deal with the complicated business of forging actual political policies, their popularity remains untested. The challenge, therefore, is to find a formula that includes them in the system, but that prevents a “one man, one vote, one time” situation.

One fairly successful attempt at such a formula was coordinated by King Hussein of Jordan, after widespread riots in 1989 over food shortages in his traditional stronghold in the south. Needing to engage the people more directly in the tough economic decisions that had to be made, he opted for a new constitutional monarchy. He brought all the political forces in the country together in a national congress, in which the rules of the democratic game were enshrined in a national charter. The Islamists signed on.

Since then, there have been several elections to this body in which Jordan’s Islamists have participated, but in only the first did they gain a plurality. Once in power, their sloganeering was put to the test, and voters were not terribly impressed. In the four ministries they held, the Islamists imposed heavy-handed restrictions on female staff members, setting off protests that eventually forced the cabinet members to resign.

Shortly after the Jordanian experiment, King Hassan II of Morocco followed suit with a similar revision of his nation’s Constitution, and despite recent terrorist attacks the country seems set on an increasingly democratic path. In 2002, the Turkish Justice and Development Party won the parliamentary elections and formed a government and – to the surprise of many – it wasn’t the end of the world. In fact, the Islamists emerged as more pragmatic than their secular predecessors in tackling some of Turkey’s chronic problems: they softened restrictions on the Kurds, looked to make compromises over Cyprus and began a successful campaign to make Turkey eligible for eventual membership in the European Union.

And consider what has happened in Iraq. Grand Ayatollah Ali al-Sistani, the most revered Shiite cleric in Iraq, has been the savior of President Bush’s policy in Iraq since the fall of Saddam Hussein. Without his unwavering backing of the January elections, the Arab world would not have seen the stirring images of millions of men and women braving their way out to vote despite threats and suicide bombers.

Of course, this is not to say that we should expect Hezbollah or Hamas to turn into Western-style democratic parties overnight. While countries opening themselves to democracy should work to bring Islamists into the system, they should not – and the West should not pressure them to – allow those groups unwilling to abide by certain rules into the game.

These principles would include: strict respect for constitutions and the rule of law, including full independence of the judiciary; recognition of the principle of the rotation of power based on free and fair elections with international observers; pledges that elections be held on a schedule that is not subject to tampering by whatever group comes to power; agreement that non-Muslim minorities must be guaranteed full citizenship and cultural rights, including the right to compete for any elected office, to freely exercise their religion rights and to speak their chosen language; and agreement that women must be assured full and equal participation in public life.

When all parties agree to such conditions, they will have gone a long way toward reducing apprehensions at home and abroad about their participation in politics. This does raise questions about who would guarantee that all parties abide by these rules of the game. Each country, of course, would have to decide for itself; Turkey made its armed forces a guardian of the Constitution, and other places it might be high courts. In any case, there must be faith in the system.

So what should be the role of the external actors – the Western powers, the United Nations, the World Bank and other international organizations – in promoting democratic reform? Much has been said in the Muslim world about President Bush’s “crusade” after the 9/11 attacks. The wars in Afghanistan and Iraq were predicated, among other things, on spreading freedom and democracy in the Middle East. More peaceful approaches toward that end also include the Bush administration’s Middle East Partnership Initiative and the Greater Middle East and North Africa Initiative that was endorsed last year at the Group of 8 summit meeting in Sea Island, Ga.

In addition, an earlier, overlooked initiative by the Europeans is worth studying, the Barcelona Accord of 1995. Under this agreement, several Arab states, including Egypt, Syria, Jordan, Morocco and Tunisia, pledged to take specific steps for enhancing civil society, human rights and democratic reforms. In return, the Europeans were to offer economic aid, favorable terms of trade and security guarantees. Unfortunately, the governments of the Arab states, with the partial exception of Morocco, enjoyed the benefits of the economic protocols but failed entirely to make the required domestic reforms.

PERHAPS the most important role foreign powers can play today is in withholding their aid, trade and technology from despotic regimes. The model is the Helsinki Accord of 1975, which set up a monitoring system of Soviet-bloc states and mandated sanctions for human rights violations, and which ultimately played a major role in bringing down Communist regimes.

Whether we are in fact seeing an “Arab spring” or a mirage depends on where you stand. Many in the Middle East, having been betrayed in the past, cannot be blamed for fearing that this is an illusion, and remembering other spring stirrings of democracy – like Budapest in 1956, Prague in 1968 and Tiananmen Square in 1989 – that were brutally crushed while the world looked on.

For me, however, something about events of the past few months feels new and irreversible. Too many people in too many places – Egypt, Iran, Lebanon and elsewhere – are defying their oppressors and taking risks for freedom. Across the region the shouts of “Kifiya!” – “Enough!” – have become a rallying cry against dictators.

With luck, the Middle East may catch the so-called third wave of democracy, which has rolled through some 100 countries since the fall of the dictatorship in Portugal in 1974. But whether it will be a spring wind or a sandstorm will depend in great part on how the Islamists are accommodated in Egypt, Lebanon and Palestine in the months ahead. President Bush and Secretary of State Condoleezza Rice have hinted recently that the United States would accept the outcome of any fair and free elections, even if it brings Islamists to power. That hint should be explicated in a clear doctrine. A government open to all and serving all is our best weapon against both autocracy and theocracy.

Saad Eddin Ibrahim, chairman of the Ibn Khaldun Center for Development Studies and a scholar at the Woodrow Wilson Center in Washington, is a candidate for president of Egypt.