Police officers stand outside the Parliament building in Tunis on March 18, 2015, following a deadly terror attack. Reuters

Tunisian authorities will be put to the test following a terror attack at the National Bardo Museum in Tunis on Wednesday. Rights groups said the deadly raid, which injured and killed dozens of foreign tourists, could hamper the country’s efforts to expand and protect its citizens' freedoms.

“[Wednesday’s] murderous assault targeted not only tourists and Tunisians, but also the tolerant and rights-respecting society that Tunisians have been struggling to build over the last four years,” said Eric Goldstein, deputy Middle East and North Africa director of Human Rights Watch, a nongovernmental organization based in New York City, in a statement Thursday.

Tunisia was hailed as the one success story of the so-called Arab Spring -- the democratic uprisings that originated in Tunisia at the end of 2010 and quickly spread across the Arab world. Tunisia ousted longtime authoritarian President Zine El Abidine Ben Ali and began transitioning to democracy. A new constitution was drafted, giving Tunisians more freedom to peacefully exercise their rights, according to a 2014 world report by Human Rights Watch.

But Tunisia’s transition has been slow and the once-ruling Islamist party Ennahda had tightened censorship since the 2011 election. In 2013, judicial authorities prosecuted a slew of journalists, bloggers, artists and intellectuals in Tunisia for alleged “defamation,” “offenses against state agents” and “harming public order.” Tunisian security forces also continued to use excessive force against protesters, according to the report.

The Islamic State group claimed responsibility for the assault, which has rocked Africa’s northernmost country. Newly elected Tunisian President Beji Caid Essebsi pledged to fight terrorism “without mercy,” according to BBC News.

But Human Rights Watch said the Tunisian government must respond to the assault without infringing on its citizens’ newfound freedoms. “Tunisian authorities should show through their response that their commitment to the rule of law is unshaken,” Goldstein said in a statement.

Tunisian authorities arrested nine people Thursday in connection with the terror attack, which killed 23 people, mostly foreign tourists. Their alleged roles in the deadly assault have not yet been released. Two of the gunmen were also among the dead and have been identified as Yassine Laabidi and Hatem Khachnaoui. The former had been flagged by the country’s intelligence services earlier, Tunisian Prime Minister Habib Essid reportedly said in an interview with France’s RTL radio Thursday.