Alone among the countries that underwent the 2011 uprisings of the Arab Spring, Tunisia emerged with a democracy, but amid a rise in attacks by Islamic radicals, the new government is increasingly considering stability and security over personal freedoms.
"There are many holes in the law that could open the way to human rights violations," said a statement by coalition of Tunisian 10 civil society groups, including the bar association, the journalists' union and several rights groups.
Three months later, another gunman attacked a resort in Sousse killing 38 tourists, mostly Britons.
Since then, the government has mobilized 100,000 additional army and police units around the country, including 3,000 dedicated to guarding hotels and tourist sites.
Also Read
As the law was being debated, Tunisian police and military forces carried out a string of raids on homes across the country, arresting 16 people in the province of Bizerte on Thursday, killing one.
Two suspected militants were also killed by police in the central city of Kasserine.
The new law, which replaces one from 2003, is meant to aid this battle while still respecting human rights, according to Abada Kefi of the parliament's legislation committee, who described it as "a balanced law."
While 176 deputies voted for it, 10 abstained and none voted against, some lawmakers have expressed reservations. "The political wrangling will affect religious rights and freedom of expression," said Sahbi Atig, a member of the moderate Islamist Ennahda Party who feared it would affect the "achievements of the revolution.