The Tunisian government is cracking down on civil and political rights as it fights a rise in Islamist insurgency, in the aftermath of the deadliest terror attack in the country's history.

On 26 June, 38 foreign tourists were killed when gunman Seifeddine Rezgui opened fire on tourists at a beach resort in the city of Sousse. Three months earlier, 21 tourists and a police officer were killed in an attack on the Bardo Museum in the capital Tunis. The self-proclaimed Islamic State (ISIS) claimed responsibility for both attacks.

Since 2011, dozens of soldiers and police officers lost their lives in attacks by groups affiliated with Al-Qaeda in the Islamic Maghreb, particularly in the mountainous Chaambi area along the border with Algeria, where the Okba Ibn Nafaa Brigade is very active.

As other countries in the region grapple with chaos, wars, and authoritarianism, Tunisia is often described as the “success story” of the so-called Arab Spring. The country's transition has so far been smooth, though remains it incomplete particularly at the level of democratic institutions and transitional justice. In January 2014, a national constituent assembly adopted a constitution that enshrines civil rights. Less than a year later, a peaceful transition of power took place when the Islamist Ennahdha party handed over power to their rival, the secular Nidaa Tounes party, following successful parliamentary and presidential elections.

But now, Tunisia's democratization process and progress on human rights progress are bring threatened by the authorities’ counter-terror policies.

Cat before being thrown in jail: ‘I do not care about human rights. I do not care about freedom. I do not care about the revolution. I just want to be secure.” Jailer: “Satisfied? You're secure now.” Cartoon by Nadia Khiari.

Eight days after the Sousse attack, President Beji Caid Essebsi declared a state of emergency in the whole country, giving authorities the power to impose restrictions on protests and strikes, cracking down on press freedom and granting the army and police more authority. Violating the state of emergency, which was lasted for over 60 days, could be punished by a six-month to two year jail sentence. It did not take long before a court in the interior region of Gafsa sentenced 13 activists to 16 days in jail for violating the state of emergency by holding a labor protest.

For critics, imposing the state of emergency was motivated by authorities’ desire to crack down on strikes and protests, rather than countering terror.

A state of emergency that has nothing to do with “fighting terrorism” but rather suppressing participatory democracy https://t.co/ZIB0WkKDzd

Speaking to the Independent, Prime Minister Habib Essid tried to justify this crackdown. “It’s to protect our young democracy,” he said. “They can’t hold protests or go on strike, but they can express themselves in other ways. People can talk or write [whatever they like].”

But despite the PM's reassurance that “people can talk or write whatever they like,” the authorities have also been cracking down on speech.

On 8 July, prosecutors charged Noureddine Mabrki, editor of the news site akherkhabaronline.com, with complicity under the country's 2003 counter-terror law for publishing a photo of Sousse gunman Seifeddine Rezgui getting out of a car right before carrying out his massacre. Published on 5 July, the photo has since been taken down at the request of the authorities, which are seeking its source. Refusing to reveal the source of the photo, Mbarki now risks between 5 and 12 years in jail.

Photo-shopped picture of PM Habib Essid carriying a shovel

The same charge was brought against Abdelfatteh Saied, a mathematics teacher who alleged on Facebook that the Sousse attack was a conspiracy carried out by security officers. Though Mbarki spent only a few hours in police custody, Saied has been in detention since July 16. He was also charged with “accusing, without proof, a public agent of violating the law” under Article 128 of the penal code for sharing and commenting on a photo-shopped picture of Prime Minister Habib Essid. The photo, which shows Essid holding a shovel, was originally posted by another user. Saied shared the photo on his Facebook wall on July 12 along with a comment on a decision by the broadcast regulator to close a number of religious radios and TV stations. He said: “[It is] as if they [the government] are waiting and thirsty for the Sousse crime to happen, to shut down all sources of moderate Islam. As if it is a gift they got from heaven.”

Human rights groups and activists are also wary of flaws in the new anti-terror law, which was unanimously approved by the parliament on 25 July. The new law replaces a 2003 law passed under the autocratic rule of Zine el Abidine Ali and under which 3000 people, including political opponents, were prosecuted.

The 2015 legislation broadly defines terrorism, extends the limit of pre-trial detention from 6 days under the previous law to fifteen days, and prescribes the death penalty for those convicted of terrorist crimes resulting in death or rape. Tunisia has never abolished the death penalty, but the 2003 law did not prescribe the death penalty as a punishment for terror related crimes.

The law further grants security services exceptional powers to intercept the communication of suspects in real time (either by telephone or online communication means), for a period not to exceed four months, after obtaining a written order from an investigative judge or a prosecutor. In addition, a jail term of up to five years is prescribed against anyone found to have “publicly and clearly praised” a terrorist crime, its perpetrator, and terror groups.

#tunisia antiterrorism law is a powerful tool in the hands of a corrupt security & judiciary system. Its impact will be devastating

it is always a pleasure to see these MPs pouring their venom, voting in favor of a draconian law and going back home believing that they have accomplished their duty

The government's counter-terror policies have also been tainted with accusations of torture.

In a statement published on 5 August, the Tunisian League for Human Rights confirmed that five suspects held on terrorism charges were tortured while in detention. Though a judge ordered their release on 4 August with two other suspects in the same case, police in civilian clothes arrested them again without an arrest warrant, as they were making their way out of the court.

During the same week, another judge ordered the release of nine suspects in the Bardo Museum terror attack, whose confessions were extracted under torture.

On the collective blog Nawaat, Hend Chennaoui writes that civil society groups have been noting a “considerable increase in police violence” since the government's declaration of a war on terror. She adds:

Meanwhile, the country's decision-makers do not seem to find a balance between democratization and counter-terrorism.