A bloody two-day siege at a house in the outskirts of the capital last week didn’t augur well for Tunisia’s landmark elections.
Six suspected jihadists, including five women, and a policeman were killed in the standoff in Tunis. A small child was also critically injured in the crossfire, which came amid repeated warnings by the authorities of Islamist attacks aimed at disrupting last Sunday’s vote.
But sanity prevailed at the polls. With a turnout of more than 60 per cent, Tunisians queued to take part in their first elections under a new constitution, sending 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.
Such hope is in desperately short supply in a region riven by political crises, Muslim militancy and wrenching brutality, from the anarchy in Libya and the beheading of a French tourist in Algeria, to Islamic State’s atrocities and self-proclaimed caliphate in large, war-ravaged swaths of Syria and Iraq. In Egypt, where an Islamist insurgency is causing havoc in the Sinai peninsula, hopes for democratic change lie in tatters since the military returned to power last year.
Against this dismal backdrop, a secular party that had presented itself as an alternative to their Islamist rivals won the largest number of seats in the Tunisian parliament, reaching out to voters disappointed by the Islamists' poor record in power.
Tunisians I spoke to at polling centers were proud to be taking part in a vote that offered a real choice, and which marked their most decisive step on the path to democracy since the 2010 revolution that eventually overthrew a venal dictatorship and sparked the Arab Spring. They were also acutely aware of the difficulties ahead.
Things could easily have been very different, and the shootout near the capital last week came as a stark reminder of the dangers that threaten the future of this North African nation on Europe’s doorstep.
The assassination of two leftist politicians last year, by Islamist gunmen, came close to derailing Tunisia’s democratic transition, while a struggling economy and poor living standards fuelled social unrest in parts of the country. Fears grew about radical Islamist groups around the country being linked to Al-Qaeda.
With such security concerns, tourist arrivals have plummeted. The French in particular are taking fright. The filming for Star Wars VII, of scenes set in the desert planet of Tatooine - which had in previous episodes been shot in southern Tunisia - was relocated to Abu Dhabi.
But 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; the deal paved the way for last week's parliamentary poll, to be followed by a presidential election in November. It even led to the astonishing rumour that Tunisia’s main trade union, the UGTT, was a frontrunner for this year’s Nobel peace prize, for its leading role in the negotiations that resolved the crisis.
The outcome of Sunday’s 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, which offers much needed political experience but is also closely associated with the kleptocratic former regime of Zine al-Abidine Ben Ali.
With neither of the two main parties commanding a majority in the 217-member parliament, they may have to work together to form a strong unity government. Many will balk at the prospect of the Islamists taking part in a new coalition. Their opponents accused them of lacking competence, failing to fix the economy and being a soft touch on extremists, who ran amok during the Islamists' two years in office.
But for all its shortcomings, the Islamist party is widely regarded as moderate, and did make 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 Ben Ali’s reign and admires the values that Britain embodies, has been a fervent advocate of moderate Islam as an effective way of defeating jihadist ideology.
But this strategy has so far failed to yield tangible results, with more foreign fighters travelling from Tunisia to Syria and Iraq than from any other country. Finding a way of stopping them will be a key challenge for the new government. Currently estimated to number around 3,000, their eventual return to Tunisia will inevitably create the same security headaches that Britain faces with its own jihadist-nationals. More targeted killings could yet destroy Tunisia’s fragile democratic consensus, as they nearly did last year.
It’s not at all clear why there are so many Tunisian jihadists in Syria and Iraq, though the ongoing social and economic problems that drove Tunisia’s revolution, including high youth unemployment, must play some part in their decision to embrace extremism and reject the democratic path.
Anis is a 27-years-old Salafist, who works in a tiny clothing store in Tunis and sports a long black beard. He studied information technology at college and tells me that some of his classmates went to Syria to fight, but he personally believes that turning to violence is not the 'Salafi way', or the right choice for ultra-orthodox Muslims.
He also dismissed the elections as pointless, like other disillusioned young Tunisians:
'I have some respect for Ennahda. They are the least bad (party). But I’m not going to vote, because the Koran is the only real constitution, and it has nothing to do with political parties.'
Anthony Dworkin, a Tunisia expert at the European Council on Foreign Relations, argues that unless the politicians form an inclusive coalition government that can find effective solutions to the country’s pressing problems and restore stability, they risk losing the confidence of ordinary citizens. He told me:
'There’s still an awful lot of stuff to do to show that democracy is going to work to deliver the needs of the people.'
Simon Martelli is a freelance journalist based in North Africa and the Middle East.