TUNIS (AFP) - President Beji Caid Essebsi on Saturday declared a state of emergency following last week's beach massacre claimed by militants that he said had left Tunisia facing a "special type of war".
In another firm response to the June 26 attack claimed by the Islamic State in Iraq and Syria (ISIS) group that killed 38 foreign tourists, several officials were sacked, including the governor of the Sousse region where it took place.
The North African state, which has seen an exodus of tourists, has admitted its security services were unprepared for the seaside attack in Port El Kantaoui and that police were too slow to respond.
In a televised address to the nation, Essebsi said the state of emergency, effective from Saturday for a 30-day period, was decided on after consultations with the parliament speaker and prime minister.
The measure was adopted because of "the exceptional situation which the country is going through after the latest terrorist attack and the persistent threats which place the country in a special type of war", he said.
A state of emergency, granting special powers to the police and army, was in force for three years up until March 2014, following longtime secular president Zine El Abidine Ben Ali's ouster in a 2011 revolution.
Apart from allowing the barring of strike action, the measure allows the authorities to carry out raids on homes at any time of the day and to keep tabs on the media.
Independent political analyst Selim Kharrat questioned the timing of Essebsi's announcement, eight days after the beach attack, and warned that a state of emergency "could become an excellent tool of repression".
An aide to Tunisia's prime minister said on Saturday that several officials, including the Sousse governor and those from the assailant's home town and where he studied, as well as police officers, had been sacked.
"Just as there have been security failures, there have also been political failures," the premier's communications adviser Dhafer Neji told AFP.
Tunisia has faced a post-revolution surge in jihadist violence in which dozens of police and soldiers have been killed.
The beach shooting was the second such rampage in three months, after another jihadist attack at the National Bardo Museum in Tunis on March 18 that killed 21 tourists and a policeman.
Tunisia had already stepped up security after the museum attack and announced in the wake of the beach killings that it would deploy armed guards on beaches and close 80 mosques suspected of fanning Islamist extremism.
On Friday, Prime Minister Habib Essid acknowledged that police had taken too long to respond to the beach attack.
"The time of the reaction - this is the problem," Essid told the BBC in an interview. Police had been "blocked everywhere", he added.
Tourists fled in horror as a Tunisian identified as 23-year-old Seifeddine Rezgui pulled a Kalashnikov assault rifle from inside a furled beach umbrella and went on a shooting spree outside a five-star hotel.
British holidaymakers accounted for 30 of those killed, along with three Irish nationals, two Germans, one Belgian, one Portuguese and a Russian, before the assailant was himself shot dead.
British Prime Minister David Cameron announced a permanent memorial would be built for the victims, hours after the coffins carrying the final five bodies of those killed arrived back in the country.
On Thursday, Tunisia announced it had arrested eight people, including a woman, "with direct links" to the attack.
The authorities have said Rezgui received weapons training from militants in neighbouring Libya, travelling to the chaos-wracked country at the same time as the two young Tunisians behind the Bardo attack.
Disillusionment and social exclusion as well as economic woes have fuelled radicalism among youths in Tunisia.
About 3,000 Tunisians have gone to Iraq, Syria and Libya to join the militant ranks.
The militant attacks have dealt a heavy blow to the tourism industry, which contributes between seven and eight percent of Tunisia's GDP.
The sector accounts for 400,000 jobs, directly and indirectly, and is a key source of foreign revenue for a country where the local currency, the dinar, is non-convertible.
The economic impact of the beach bloodbath, on top of the upheaval following the overthrow of Ben Ali, is likely to exceed half a billion dollars for 2015, according to Tourism Minister Selma Elloumi Rekik.