Regardless of the headlines, it is too early to admit defeat in the struggle to combine political Islam with people power.
Tunisia's Islamists see a solution that Egypt desperately needs
A casual observer of the Arab world will most likely have concluded that the experiment in adapting political Islam to democracy has already failed. Almost two years ago, as the Arab revolutions began in Tunisia, it seemed a foregone conclusion that political pluralism on a western model would take the place of the ageing autocrats who had been kept in power for decades by their security services.
But two years is a long time in revolutionary politics. Egyptians will begin voting tomorrow on their new constitution, against a background of bloody protests against the Islamist president, Mohammed Morsi, who is accused of trampling over the liberal and secular opposition to create an Islamic state.
While demands for a boycott of the vote appear to be weakening, the constitutional process will be tainted in the eyes of many Egyptians and observers abroad. The new constitution was drawn up by a Constituent Assembly controlled by Islamists after liberals and representatives of the Coptic Christian minority walked out.
Mr Morsi makes no apology for his rush to put the draft to a vote. In his view, the supreme constitutional court, a power centre filled with appointees from the old regime, was on the point of dissolving the assembly. This would have amounted to sabotage of the transition to democracy under the guidance of the Muslim Brotherhood-aligned forces which won two elections.
While there is some truth in Mr Morsi's suspicions about the judges, he has failed to understand the basic tenet of democracy: the tyranny of the majority is hardly better than any other type of tyranny. The majority has to show some respect for minority views, and not use the institutions of democracy to engineer a revolution.
Looking at the wider Arab world, parliamentary democracy in Iraq has created an ineffectual government, based largely on sectarian parties, and scarred by some of the more rapacious corruption in the world. This was not the aim of the Americans when, 10 years ago, they decided that post-Saddam Baghdad would be the centre from which liberal democracy would fan out across the region.
But does it all have to end in disaster? Recently I have had the chance to speak to the two leading figures in Tunisia's transition from dictatorship to democracy, Sheikh Rached Ghannouchi, the leader of the Islamist Ennahda (Renaissance) movement, and Moncef Marzouki, the interim president, who is a veteran opposition figure and human rights activist.
The Tunisian transition is hardly going smoothly: it should have concluded in October, with a new constitution and the holding of new elections, but the process is being delayed by differences between the Islamists and the secular parties in the government coalition. It looks like elections will not be held for another year. Meanwhile, the clamour is growing for authorities to create jobs for the poor who have seen nothing from the revolution and have lost their fear of the police.
Not for nothing Mr Marzouki fears that more delay will lead to a "revolution within the revolution". For his part, Sheikh Ghannouchi is concerned that the Salafis, the extreme Islamists who reject any compromise with secular forces and threaten to outflank him in the competition for votes, should somehow be kept within the law and not forced underground.
It would be easy to highlight the differences between the Islamists and the secular forces: Mr Ghannouchi says one of the goals of the revolution is to return Tunisia to its Arab-Muslim roots and achieve social justice "through the door of Islam and Arabism".
Mr Marzouki, a medical doctor who practised for years in the Paris suburbs, stresses Tunisia's 3,000-year history of "confrontation and cooperation" with the northern shore of the Mediterranean. Its French heritage is a part of its identity which cannot be ditched, he says.
But to stress these differences is a journalistic trick that misses the real point: these parties are working in coalition. They speak openly of their differences and try to solve them in a democratic way. Mr Marzouki says his greatest fear is to fall out with the moderate Islamists.
Mr Ghannouchi, under fire for reaching out to the Salafis with comments that appeared to suggest that they shared the same goal of an Islamic state, but differed only in timing, says he has never wavered from his key beliefs: the compatibility of Islam and democracy, the rejection of violence and the recognition of political pluralism and gender equality.
If this experiment is going to work anywhere, it should be in Tunisia, a small Muslim country with high rates of literacy and no significant religious or ethnic minorities.
In its case, the cleavages are not religious but ones of identity: the well-off elite with their villas on the Carthage coast think they are living in France. The poor tend to clutch at Islam as the way forward, after decades of state-enforced secularism. But they too have acquired a strong European stamp in the form of the trade union movement, probably the second force in the country after the Islamists.
Mr Ghannouchi is also an outlier in the wider Islamist movement. Years in exile in London, where his daughters gained high qualifications from the best universities, have given him a deep respect for parliamentary democracy. That is hardly true for Mr Morsi, a proud son of the Egyptian soil who during his years in America shunned the abominations of western culture and kept company with other observant Muslims.
Egypt is, of course, the pivotal country where events are being followed all over the world. But Tunisia shows there is a more consensual way forward. And all is not lost in Egypt. The experience of the revolution cannot be instantly forgotten. There is a feeling that the people should be in control of their destiny, however difficult that is to put into practice in a country with a crushing burden of poverty and poor education. Whatever the headlines say, it is too early to admit defeat in the struggle to combine political Islam with people power.
On Twitter: @aphilps