Tunisian President Beji Caid Essebsi has declared a state of emergency after the recent attack on a beach hotel that killed 38 foreigners, saying that "the continued threat" the country faced left the country in "a state of war".

Last week's attack, three months after a deadly assault on the Bardo museum in Tunis, has shocked the North African country trying to emerge into a democracy after a 2011 revolution.

Tunisia's emergency laws temporarily give the government more executive flexibility, hand the army and police more authority, and restrict certain rights such as those dealing with public assembly and detention.

"Due to the terrorism risk, and the regional context, and spread of terrorism, we have declared a state of emergency," Essebsi said in a televised address.

"The continued threat we face leaves the country in a state of war, where we have to use all measures necessary."


RELATED: Moncef Marzouki: The challenge of terrorism


An earlier state of emergency was lifted in March 2014, having been in force since longtime president Zine El Abidine Ben Ali was overthrown in a 2011 revolution.

The development came as several Tunisian officials, including the governor of Sousse, were sacked after the massacre, an aide to the premier said on Saturday.

"Just as there have been security failures, there have also been political failures," the prime minister's communications adviser Dhafer Neji told the AFP news agency.

Surge in violence

Tunisia has faced a surge in violence since the revolution and dozens of police and soldiers have been killed since then.

The June 26 beach attack  in the town of Sousse was the second deadly attack in three months, following a shooting rampage at its national museum in the capital Tunis that killed 22 people.

On Friday, Prime Minister Habib Essid acknowledged that police had taken too long to respond to last week's attack by a gunman at the beach resort of Port El Kantaoui near Sousse.

The Islamic State of Iraq and the Levant (ISIL) group claimed responsibility for the attack by a Tunisian identified as 23-year-old Seifeddine Rezgui who pulled a Kalashnikov assault rifle from inside a beach umbrella and went on a bloody rampage at the five-star Riu Imperial Marhaba Hotel.

In addition to 30 Britons, three Irish nationals, two Germans, one Belgian, one Portuguese, and a Russian were also killed.

On Thursday, Tunisia announced it had arrested eight people, including a woman, "with direct links" to the attack.

Source: Agencies