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.
The state of emergency will be in place for a renewable period of 30 days.
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.
Tunisia has launched a security clampdown after Sousse attack in which 38 people were killed, PM Habib Essid has announced.
Habib Essid said army reservists would be deployed to archaeological sites and resorts.
About 80 mosques accused of “spreading venom” will close within a week, he said.
Authorities say most of the victims in yesterday’s attack near Sousse were Britons. The gunman was shot dead.
Officials say he was a student not previously known to authorities.
Five Britons were confirmed dead and the Foreign Office warned the death toll could rise.
Tunisians, Germans, Belgians, French and at least one Irish citizen were also among those killed in the attack, which was claimed by Islamic State (ISIS). Thirty-six people are injured, officials say.
It was the second major attack on tourists in Tunisia since March, when militants killed 22 people, mainly foreigners, at Bardo museum in Tunis.
Speaking at a news conference in Tunis, Habib Essid said some mosques outside government control were spreading “their propaganda and their venom to promote terrorism” and would be shut down.
Habib Essid also vowed to act against parties and groups “acting outside the constitution” – such action could range from a warning to closure.
He said army reservists would be deployed at sensitive sites to ensure such attacks could not happen again.
“The country is under threat; the government is under threat,” Habib Essid said.
“Without the co-operation of everyone and a show of unity, we cannot win this war. We have won some battles and lost others, but our objective is to win the war.”
Security officials said the attacker, who had posed as a swimmer but was carrying a rifle under a parasol, started shooting on the beach before entering the Hotel Imperial Marhaba, continuing to shoot.
Local media reported a second suspected attacker had been arrested, but this has not been confirmed.
ISIS had urged followers to step up assaults during the holy Muslim month of Ramadan.
Many of the tourists in hotels affected by the attack left Tunisia overnight, with tour operators arranging special flights to take them home.
Friday’s attack was the deadliest in Tunisia’s recent history. The country has seen militant Islamists gain strength since the overthrow of long-serving ruler Zine al-Abidine Ben Ali in in 2011.
Democratic elections after Zine al-Abidine Ben Ali’s removal saw the moderate Islamist Ennahda party take power before the secularist Nidaa Tounes government won a parliamentary poll in October.
However, neither party has been able effectively to combat Islamist violence – which has been made worse by conflict in neighboring Libya and by Tunisian fighters returning home after joining Islamist campaigns in Iraq and Syria.
Six Tunisian police chiefs have been fired following last week’s attack on the famous Bardo Museum, PM Habib Essid has announced.
PM Habib Essid had noted several security deficiencies during a visit to the museum, his office said.
The Islamic State (ISIS) said it carried out the attack on Bardo museum in the capital, Tunis, killing 23 people, mostly European tourists.
Two of the gunmen were killed by the security forces, while a third was on the run, Tunisian President Beji Caid Essebsi said.
“There were certainly three attackers… there is one who is on the run, he won’t get far,” President Beji Caid Essebsi said on March 22.
The attack was the deadliest in Tunisia since the uprising which led to the overthrow of long-serving ruler Zine al-Abidine Ben Ali in 2011.
Photo AFP/Getty Images
The police chiefs of Tunis and the museum were among those dismissed, Habib Essid’s spokesman Mofdi Mssedi told AFP news agency.
Habib Essebsi said in an interview with French media that a monument would be erected in memory of the victims.
The gunmen are said to have been trained in Libya in an area controlled by ISIS militants.
The two gunmen seen in the video were named as Yassine Laabidi and Hatem Khachnaoui. They were both killed in a gunfight with security forces inside the building.
In an earlier interview with Paris Match, Habib Essebsi said that “shortcomings” in Tunisia’s security system meant “the police and intelligence services had not been through enough in protecting the museum”.
However, Habib Essebsi added that the security services “reacted very efficiently” to the attack and had helped save dozens of lives.
Twenty foreigners were among those killed in the attack, including British, Japanese, French, Italian and Colombian tourists.
Following the attack, large numbers of Tunisians gathered outside the museum to protest against terrorism.
Tunisia has seen an upsurge in Islamist extremism since the 2011 revolution – the event that sparked the Arab Spring.