TO SEE an Arab country shaking off the shackles of despotism is a rare and unalloyed joy. Moreover, Tunisia has a chance to set an example for the rest of the Arab world. It is a small country which, for all the venality of its ousted leader, Zine el-Abidine Ben Ali, has done better than most at opening up to the world, getting its economy to grow apace, educating its 10.6m people, giving them a modicum of health, and promoting its women. The bearded fanatics who have all too often been spawned by repressive regimes as the vanguard of opposition seem mercifully absent from the streets of Tunis. If calm is restored and genuine elections take place in the next few months, Tunisia may yet emerge as a pluralist and peaceful democracy. It would be a momentous event.

It would also be a beacon. Among the Arab League's 22 countries, only three can claim to be democracies and all of those are flawed: Iraq, still afflicted by suicide-bombers and sectarianism, its democracy forced on it by the United States; the Palestinian territories, a state as yet only in name, occupied by Israel and contested by its own people; and Lebanon, where free elections are marred by the necessity of sectarian quotas and where the nation is torn between conflicting visions that, even in the past fortnight, have deprived it of a government. All the rest range from the nastiest of tyrannies, such as Libya's, to the more benevolent autocracies, such as Qatar's, with shades of authoritarian and oligarchic regimes in between. Yet none gives its people the right to choose who will run their lives. The Arab world embraces vast wealth and more than 350m people. One of the great puzzles is why in terms of democracy it should be the most backward on earth.

Nothing suggests that Arabs are inherently disposed to reject the ballot box. Nor is the practice of Islam, at least in its more malleable versions, incompatible with multiparty democracy. Here Turkey has shown the way, with a mildly Islamist ruling party accepting constitutional checks and balances, including in matters of mosque and state. Mainly Muslim Asian countries, such as Malaysia and Indonesia, are also seeking to entrench democratic systems. Even Iran under the ayatollahs had, before the repression of the past 18 months or so, tolerated more political competition and open debate than its Arab neighbours have.

Don't jump the Tunisian gun…

However, the “jasmine revolution” has a long way to go before it can claim to have established a democracy (see article). The fall of Mr Ben Ali was fairly bloodless and astonishingly sudden. His successors, such as they are, have promised the release of all political prisoners, the freedom of the press, the legality of all political parties and the holding of genuine elections under the gaze of international observers. But such early gains are still reversible. Nobody knows who, in a week's time, will be in control. Chaos may persist. Leading figures from Mr Ben Ali's regime are still in contention. His hated security service seems to be pitted against the more respected army, which could yet step in—initially with popular support, if it stems the flow of blood on the streets. The opposition is inchoate, its leadership unknown, its aims so far vague and various.

Leaders in the rest of the Arab world are nervous—and so they should be. The mobile telephone, satellite television and the internet all have the potential to weaken their capacity for keeping their people in the dark and under their control. The cannier despots know that whispers of dissent among the few can turn into howls of anger among the many—in a Tunisian trice. Across the Maghreb—in Morocco and Algeria to the west and Libya and Egypt to the east—the din of Tunisian protests is reverberating. With its 84m mostly poor and frustrated people, Egypt is the pivot. It is the main ally of the West and a force for moderation in the search for peace between Israel and the Palestinians. If it should implode, the geopolitics of the entire Middle East would be turned upside down.

But do not assume that the heady scent of jasmine will dispatch the rest of the region's despots. The Arab world is not like eastern Europe two decades ago, when repressive regimes tumbled because ordinary people suddenly dislodged the prop of Soviet power. Today's Arab leaders have long relied on their own home-grown security systems. They will not relinquish any control in a hurry. Autocrats know that opening the door to democracy a bit risks letting the mutinous masses barge the whole way in.

Moreover, the spectre of Islamism—not to be confused with plain Islam—makes many observers queasy. Tunisia's new wave so far is secular. But what if an Islamist movement, here and there in the region, rose on the crest of revolt—and took power by the ballot box? Would it allow “one person, one vote, one time”, as many secular critics predict? For too long this fear has made Western governments look the other way when secular but repressive Arab regimes, helping to swat the jihadists, have denied their people basic freedoms.

…and don't fear Islam

It is not an easy calculation. Many Islamists think God and the Koran should take precedence over parliaments, parties, pluralism and popular debate. At the extreme end of the Islamist spectrum are hard men whose rule would be a lot harsher than that of Mr Ben Ali and his ilk. But in few Arab countries is an extreme version of Islam either preponderant or popular. The Muslim Brotherhood, the true opposition in Egypt, embraces a range of attitudes. The more tolerant and sensible in its number are probably the most popular. Seeing that undemocratic secular regimes have failed to give them satisfaction, Arabs should be allowed to vote for Islamists if that is their wish. It is a risk—for themselves and for the rest of the world. However, as the past few weeks have shown, winking at secular despots, as they tighten the screws on their disgruntled people, may in the long run be riskier.

Tunisia's upheaval has only just begun. No one knows where it will lead. It has already opened an Arab Pandora's box. Frightening things may yet leap out. But it nonetheless deserves an enthusiastic welcome.