The attacker, disguised as a tourist, opened fire on people relaxing by the pool and on the beach. A tranquil holiday setting was turned into a scene of terror.
In a televised address, Tunisian Prime Minister Habib Essid said it is a “national duty” to fight extremism.
37 are confirmed dead in the attack.
Moves are now being made to close down 80 mosques that remain outside state control, for inciting violence and to crack down on financing channels for some associations.
The attack happened at the Imperial Marhaba hotel in Sousse, a popular beach resort around 140 kilometers south of the capital Tunis.
It has been claimed by the self-proclaimed Islamic State group, which called on followers to step up assaults during Ramadan.
British, German and Belgian nationals are among those murdered. The gunmen was reportedly shot dead by police.
Local radio said that police captured a second gunmen, but officials did not immediately confirm the arrest or his role in the attack.
“It was just one attacker,” said a hotel worker at the site. “He was a young guy dressed in shorts like he was a tourist himself.”
Many tourists are now leaving Sousse, with special flights laid on to get people home.