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.
Tunisian authorities have arrested twelve suspects in connection with the deadly attack in Sousse, an official has said.
Security forces were still hunting for two men suspected of having trained in Libya with gunman Seifeddine Rezgui who killed 38 people, he added.
Most of those killed on a beach in Sousse were British, along with other European holidaymakers.
ISIS militant group has claimed the attack as its own.
Tunisia’s government fears the attack will destroy its tourism industry, the country’s biggest foreign currency earner.
In March, two gunmen killed 22 people at the famous Bardo museum in Tunisia’s capital, Tunis.
“This is a group who were trained in Libya, and who had the same objective. Two attacked the Bardo and one attacked Sousse,” Lazhar Akremi, minister for parliamentary relations, said, Reuters news agency reports.
“Police are hunting for two more,” he is quoted as saying.
Lazhar Akremi did not say when the arrests were made.
Tunisian authorities have identified 23-year-old student Seifeddine Rezgui as the gunman who carried out the attack.
They have released photos of two suspects, Bin Abdallah and Rafkhe Talari – friends of Seifeddine Rezgui that the police have yet to locate.
ISIS has a significant presence in Libya, Tunisia’s eastern neighbor, and is thought to control the major towns of Derna and Sirte.
The names of those killed in the attack are being released as well as those who are injured and missing.
A group of people have been arrested in Tunisia over the massacre of 38 people, mainly tourists, by gunman Seifeddine Rezgui at the beach resort of Sousse on June 26, the country’s interior minister has said.
Mohamed Gharsalli said 1,000 troops would now be deployed to protect Tunisia’s beach resorts.
Three European ministers have laid flowers at the scene of the attack in a sign of solidarity.
Islamic State (ISIS) has said it was behind the attack.
“We have started by arresting a first group, a significant number of people, from the network that was behind this terrorist criminal,” said Mohamed Gharsalli, referring to Seifeddine Rezgui.
Tunisian authorities say Seifeddine Rezgui was the only attacker, but he had accomplices who provided him with weapons and logistical support, reports AP news agency.
“We are friends against one enemy,” said Mohamed Gharsalli, addressing his counterparts from the UK, Germany and France.
Seifeddine Rezgui came onto the beach from the sea either by jet ski or speedboat at about midday on June 26. He started shooting on the beach, entered the Hotel Imperial Marhaba and ran out of the front of the hotel before the police shot him dead.
The attack was the deadliest in Tunisia’s recent history. In March, militants killed 22 people, mainly foreigners, at the Bardo museum in the capital Tunis.
Tunisian authorities say army reservists will be deployed to tourist sites and that about 80 mosques accused of inciting violence will be closed within a week.