Tunis - Tunisia has hit back at a deadly jihadist attack on troops by closing mosques and media outlets seen as sympathetic to extremists, raising fears of a return to the censorship of the old regime.
In the wake of a 16 July attack which left 15 soldiers dead in Mount Chaambi near the Algerian border, the authorities have laid down a "red line" against criticism of the army and police.
The government announced the immediate closure of mosques which had fallen out of the control of the religious affairs ministry.
It has also decided to shut down unlicensed media outlets which had "turned into platforms for takfiris and jihad," referring to apostasy charges against fellow Muslims.
Hailed as the poster boy of the Arab Spring - the wave of uprisings that swept the region from 2011 - the authoritarian regime of Tunisia's longtime president Zine El Abidine Ben Ali was toppled in a popular uprising that year.
But now with a growing challenge from jihadists, long repressed under Ben Ali, the government is facing a double challenge.
The authorities are working to restore the "prestige" and "authority" of a state weakened by the 2011 revolution.
They also aim to curb the Islamist rhetoric which has found an outlet in a media landscape that has exploded over the past three years, with many broadcasters operating unlicensed.
Rights groups are warning against curbs on liberties that were hard-won after years of Ben Ali's dictatorship, urging a balance between anti-terror measures and freedom of information.
Reject 'red line'
"The country is going through a very difficult time and politicians are under pressure," said Rachida Ennaifer of Tunisia's audiovisual regulatory body HAICA.
"But the fight against terrorism should not be arbitrary or populist. If we want a state of law, we must respect the law," she told AFP, pointing to the dilemma faced by authorities.
Ennaifer said the government's decision to close a pirate radio and a television station was not taken in consultation with HAICA, contrary to what the authorities said.
The head of Tunisia's journalists' union, the SNJT, Neji Bghouri, told AFP that he rejected "any red line".
"What does this expression mean? If in the future a journalist wants to carry out an investigation into corruption in the police or army, what will happen?" he asked.
He proposed "self-regulation" of the media, something which he admitted would need time because Tunisia's free media was in its infancy.
His union last week hosted a meeting of several media outlets to develop a "charter" on how to cover terrorism-linked events.
'It's not easy to recover a mosque'
On the religious front, the closure of "outlaw" mosques has also divided opinion in the North African nation.
"The decision ... is wrong because it's going to increase popular support for the terrorists," said Mohamed Ben Salem, a senior official in the moderate Islamist movement Ennahda, the main party in parliament.
"Change the imams operating outside the law, that's the solution," he said.
Religious Affairs Minister Mounir Tlili hit back, saying "it isn't easy to recover a mosque" in the face of the often "violent" reaction of its users.
But Tlili vowed not to return to the practices of the Ben Ali regime.
Some in Tunisia, fearful of the jihadist threat, shrug off concerns over the possible erosion of civil liberties.
"Stop talking to me about human rights," Ferid al-Beji, a popular imam, or prayer leader, said on private television station Nessma, a day after the Mount Chaambi attack.
"We are fighting for our lives. Whoever talks of human rights at this time is an accomplice in terrorism," he said.