As Tunisia agonises over whether Friday’s horrific attack on western sunbathers at the Al Kantaoui resort, which could have been avoided, much of the blame will inevitably turn to ‘blow-back’ from the 3,000 Tunisian fighters who left to join Daesh (the self-proclaimed Islamic State of Iraq and the Levant) in Syria, Iraq and Libya. Out of Tunisia’s population of more than 11 million, these radicalised fighters represent a tiny fraction, who must not be allowed to destabilise the entire country.

Four months ago, deep in the Tunisian desert, I chanced upon Tunisia’s version of Glastonbury, Les Dunes Electroniques, a three-day festival of world music, where more than 7,000 Tunisian and foreign guests danced into the night in the Sahara. February in the desert can have its surprises and this year’s ravers had their commitment levels tested, not by a Daesh attack but by torrential rain turning the sand into muddy rivers, forcing cancellations as water and electronics mixed. Spirits undampened, Tunisia’s young at heart padded through puddles wearing plastic bags on their feet. They also enlivened the spirits of restaurateurs, hoteliers and shop-owners of the region, for whom the drop in tourism over the past four years has been hard.

Tunisians have a uniquely tolerant Islamic heritage. Most are moderate Sunnis and many have a natural affinity towards mystical Islam or Sufism. In the heart of Tunis stands a statue of the figure who embodies this, Ibn Khaldoun, the world’s first sociologist philosopher who was born there in 1332. In modern Tunisia, this heritage was personified by the Sufi poet and novelist Abdul Wahab Meddeb (1946-2014). His landmark work La Maladie d’Islam from 2002 explained: “If, according to Voltaire, intolerance was Catholicism’s sickness, if Nazism was Germany’s sickness, fundamentalism is Islam’s sickness.” He wrote more than 30 books advocating an Islam of Enlightenment and a dialogue between civilisations.

But when battling against fundamentalism, how do you get the balance right? How do you protect your citizens without also infringing their human rights? These questions face us all in countries where freedom and democracy are valued. Full protection for Tunisia’s Mediterranean beaches can never be guaranteed. Airport-style security checks are difficult to put in place. Tunisia’s secularist government took the difficult path, the costly path, to aim for Western-style freedom and democracy.

Abuse and torture

After the Bardo Museum massacre in March that left 24 dead, their Cabinet proposed new anti-terrorism laws, seeking to enhance the powers of the security services and extend the period police can detain suspects from six to 15 days before they appear in court. In Tunisia, the army is generally respected by ordinary citizens, so it is significant that Prime Minister Habib Al Sid is sending army reservists to guard archaeological sites and resorts. The police and security services, on the other hand, are perceived by two thirds of Tunisian households to be corrupt, according to the Global Corruption Barometer. They are mistrusted because of a record of abuse and torture of detainees, with some dying.

Bribery to avoid detention is often the only option. Soon after the Jasmine Revolution in 2011, I asked a Tunisian official how the country had dealt with its corrupt security forces. He told me that about 10 per cent — those that were too corrupt to stay — had been forced to leave, most of them flying to Italy. But it seems a new layer has quickly replaced them.

Maybe Friday’s attack and the world condemnation that followed will be a wake-up call to reform the police. Many Tunisians blame the police and security services for not doing more to prevent the Bardo Museum massacre.

The government has a long hard road ahead, trying to persuade secularists to coexist peacefully with religious conservatives and trying to stop its Jasmine Revolution being hijacked by a minority of Islamists. Tunisia is unique in the Arab world in having strong women who campaigned for equal rights, a solid middle class civil society and responsible trade unions.

All this would be lost were Daesh to gain a foothold. Tunisia’s fragile fledgling democracy got more fragile on Friday. The coming weeks and months will test it further. The US and Europe must help the country stay on the course of moderation. If Tunisia fails, there is no hope for all the rest.

— The Telegraph Group Limited, London, 2015

Diana Darke is the author of My House In Damascus: 
An Inside View Of The Syrian Revolution.