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.
Beji Caid Essebsi has been sworn in as Tunisia’s president after winning the country’s first free presidential poll.
Beji Caid Essebsi, 88, secured victory last week over incumbent Moncef Marzouki.
His triumph means Tunisia – where the Arab Spring began – remains the only Arab country to move from authoritarian rule to democracy in that period.
On December 29, electoral authorities confirmed that Beji Caid Essebsi had won a run-off vote against Moncef Marzouki.
The new president took his oath of office at a ceremony in the newly elected parliament – where his party Nidaa Tounes also holds the largest number of seats.
The swearing in comes four years after protests that eventually toppled President Zine al-Abidine Ben Ali in January 2011.
Journalist Naveena Kottoor in Tunis says that while this is the latest democratic milestone for Tunisia, many in the country are arguing that political transition will only succeed if newly-elected politicians usher in social and economic changes.
Beji Caid Essebsi has urged all Tunisians to “work together” for stability but critics say his win marks the return of a discredited establishment, pointing out that he served under President Zine al-Abidine Ben Ali.
This month’s vote was the first time Tunisians have been able to vote freely for their president since independence from France in 1956.
The new president will have restricted powers under a constitution passed earlier this year.
Beji Caid Essebsi will be commander-in-chief of the armed forces but can appoint or sack senior officers only in consultation with the prime minister.
Tunisia is voting in the first presidential election since the 2011 Arab Spring revolution that triggered uprisings across the region.
Twenty seven candidates are in the race, but incumbent Moncef Marzouki and anti-Islamist leader Beji Caid Essebsi are widely seen as the favorites.
The poll forms part of a political transition after the revolution that ousted Zine al-Abidine Ben Ali.
A parliamentary vote was held in October.
Tunisia – seen as the birthplace of the Arab Spring – is considered to have had the most successful outcome, with relatively low levels of violence.
Today’s election will deliver the country’s first directly elected leader since the removal of Zine al-Abidine Ben Ali. Most polling stations were opening at 08:00 and due to close 10 hours later.
If no candidate wins more than 50% of the vote, a run-off round will be held on December 31.
“We were the first to enter this cycle of change which they have called the Arab Spring,” PM Mehdi Jomaa was quoted as saying on the eve of the poll.
“We will be the first [to make the transition] but others will follow,” he added.
Beji Caid Essebsi, from the Nidaa Tounes (Tunisia’s Call) party, is the favorite to win after his party came first in the parliamentary election.
However, critics say Beji Caid Essebsi, an 87-year-old who served in the governments of post-independence leader Habib Bourguiba as well as Zine al-Abidine Ben Ali, represents the past.
Among the other candidates are Moncef Marzouki, parliamentary Speaker Mustapha Ben Jaafar, Republican Party leader Ahmed Nejib Chebbi, female magistrate Kalthoum Kannou and businessman Slim Riahi.
The Islamist party Ennahda, which led Tunisia’s last government but was beaten by Nidaa Tounes in October’s parliamentary election, did not field a candidate.
A statement from Ennahda leader Rachid Ghannouchi spoke of wanting “to avoid deepening polarization or dividing the country”. Ennahda’s rise had led to concerns among more secular-minded Tunisians that Islamists would dominate politics.
Tunisia is still facing the specter of civil unrest and terrorism, with Interior Minister Lotfi Ben Jeddou warning of “serious security threats” near the Algerian border where al-Qaeda militants are said to be hiding.