Tunisia is seen as the birthplace of the Arab Spring -- the pro-democracy movement which sought to replace autocratic governments in several Arab countries.
A breakthrough in the political crisis last January brought the country back from the brink, as intensive negotiations finally produced an unlikely compromise: Ennahda, the Islamist party in power at the time, agreed to step down once a new constitution had been adopted and the deal paved the way for parliamentary poll on October 26 under the care-taker government, to be followed by a presidential election in November.
Against this backdrop, a secular party, Nidaa Tounes, that had presented itself as an alternative to their Islamist rivals won the largest number of seats in the Tunisian parliament. More than 60% Tunisians queued up to take part in their first elections under a new constitution. The victory sent out a strong message of hope. And so began a new chapter in the remarkable story of a small country that has kept the aspirations of the Arab uprisings alive.
The Tunisian Islamic party, Ennahda, is widely regarded as moderate, and made concessions in order to keep Tunisia's political transition on track -- in striking contrast to the Muslim Brotherhood, its Egyptian counterpart, which paid a heavy price for clinging to power as the situation in Egypt deteriorated.
Rached Ghannouchi, the founder and leader of Ennahda who spent 20 years exiled in London during deposed President Ben Ali's reign, has been a fervent advocate of moderate Islam as an effective way of defeating jihadist ideology.
There are several reasons why the Islamic party lost the election. First, Islamist parties currently carry a bad image because of Muslim militancy in Libya and the beheading of a French tourist in Algeria, to Islamic State's atrocities and self-proclaimed caliphate in large in the war-ravaged swaths of Syria and Iraq. In Egypt, an Islamist insurgency is causing havoc in the Sinai Peninsula.
Second, the assassination of two leftist politicians last year, by Islamist gunmen, came close to derailing Tunisia's democratic transition. Fears grew that radical Islamist groups around the country were being linked to al-Qaeda. Somehow the Ennahda could not escape from the accusation of failure to protect the leftist politicians.
Third, Ennahda was not able to manage a dialogue with the influential and capable Tunisian media establishment, something that can be attributed to the absence of a clear media policy for the party; hence, it was not able to direct compelling messages to this sector of the Tunisians in the face of the policy of fear used by the secular party, Nidaa.
Fourth, other analysts believe that some leftists in some constituencies voted for Nidaa with the aim of changing the balance of power, which made the party get the highest percentage of seats in the parliamentary elections.
Fifth, according to some observers, Ennahda's failure in managing some economic issues and attending to social demands during its tenure remained a reason for their loss in the elections.
The outcome of vote is a huge setback for the Islamist Ennahda; and a triumph for their sworn rivals Nidaa Tounes, the secular party led by 87-year-old Beji Caid Essebsi.
However, since the secular party could not secure absolute majority of seats in the 217-member parliament, it may have to form a coalition with another party to constitute the government.
Anthony Dworkin, a Tunisia expert at the European Council on Foreign Relations, argues that unless the politicians form an inclusive coalition government that can address the country's pressing problems and restore stability, they risk losing the confidence of ordinary citizens.
The ideology canvassed by Islamic parties does not appeal to the majority of voters in the Muslim majority countries. It is noted that last April, Islamic parties also did poorly in the general elections in Indonesia, the largest Muslim-majority in the world with about 240 million people, of which 88% are Muslims. Voters in Indonesia have reaffirmed the appeal of broad-based secular parties over Islamic-oriented rivals.
The writer is former Bangladesh Ambassador to the UN, Geneva.