A state of emergency has been declared in Tunisia just over a week after 38 tourists, mainly British, died in an attack in the resort city of Sousse.
The state of emergency gives security forces more powers and limits the right of public assembly.
Tunisian authorities had already tightened security, deploying more than 1,400 armed officers at hotels and beaches.
President Beji Caid Essebsi said in a national address that “exceptional measures” were needed.
“In order to face up to this scourge we need to be prepared. We need to have enough troops, proper training and material means – we are in desperate need of material means,” he said, appealing for international counter-terrorism support and co-operation.
An official from PM Habib Essid’s office said several officials had been sacked in the wake of the attack, including the governor of Sousse.
“Just as there have been security failures, there have also been political failures,” Dhafer Neji told AFP.
Security forces were criticized for not responding more quickly to the attack on June 26 in Sousse, when a gunman opened fire on tourists on a beach and in a hotel before being shot dead by police.
The gunman has been identified as student Seifeddine Rezgui, who authorities say had trained in Libya.
PM Habib Essid said Seifeddine Rezgui had probably trained with the Ansar al-Sharia group, though Islamic State (ISIS) earlier said it was behind the attack.
Eight people have been arrested on suspicion of collaborating with Seifeddine Rezgui, and the government says it has uncovered the network behind the Sousse attack.
Authorities have also pledged to close some 80 mosques that were operating outside government control and accused of spreading extremism.
The last time Tunisia declared a state of emergency was in 2011, in the uprising which overthrew President Zine al-Abidine Ben Ali. It was lifted in March 2014.
Officials are expected to pass a counter-terrorism bill that has been in parliament since early 2014 in the coming weeks.