A woman holds a placard reading: "No to Terrorism" as she demonstrates in front of the National Bardo Museum a day after gunmen attacked the museum and killed scores of people in Tunis, Tunisia, Thursday, March 19, 2015. The Islamic State group issued a statement Thursday claiming responsibility for the deadly attack on Tunisia's national museum that killed scores of people, mostly tourists.

Evidence emerged that the terrorist attack that killed 23 people in Tunis Wednesday – most of them tourists – was in part enabled by the chaos in neighboring Libya, even as rallies were held across Tunisia denouncing violence.

Security Minister Rafik Chelly told Al Hiwar Ettounsi TV that two of the attackers on the Bardo Museum who were killed by security forces had attended militant training camp in Libya last December. He said Tunisians have been hosted at training camps in Derna – long the center of Islamist militancy in Libya – and in the eastern city of Benghazi, the country's second largest.

The self-styled Islamic State (IS) claimed responsibility for the attack, though whether the group or a member of its lose network of affiliates in North Africa was actually responsible is hard to say. Groups that rely on terror like IS – one of its foundational texts is called the "Management of Savagery" – often falsely claim attacks to make themselves look larger and more important than they are.

Nevertheless, IS supporters have been highly active in Libya, both participating in and benefiting from the civil war. When the group's local affiliate murdered 23 captives in February – most of them Egyptian Christians – it was a message that IS had established more than a toe-hold in North Africa.

The murders took place on a beach, in what IS called "Wilyat Trabulus," or the "Province of Tripoli" in their version of the globe. Baghdadi's followers have taken to declaring national and local borders null and void and renaming places they imagine they rule. The name roughly corresponds to the coastal eastern half of the country.

But what is clear is that IS supporters have the numbers, the wherewithal, and the operational security to hold 21 captives for weeks and then carry out a highly-produced murder show on a beach without fear of intervention from Egypt or anyone else. The thin stretch along the Mediterranean coast is home to roughly 90 percent of Libya's people.

And though Tunisia generally has less Al Qaeda-style terrorism than its neighbors – Wednesday's attack was the bloodiest in the country since 19 people were killed at a synagogue there in 2002 – it has long been an exporter of jihadis. Tunisians were a major source of recruits for Al Qaeda in Iraq (AQI) during the US occupation of that country and have continued to travel abroad to join that group's successor, the Islamic State.

To be sure, the numbers are a drop in the bucket compared to Tunisia's population of 10 million. It is estimated that about 3,000 to 6,000 Tunisians have gone to fight in Iraq and Syria. But the prospect of some of those fighters one day coming home is a major security concern for Tunisia, much as it is for the region. Returning fighters from the anti-Soviet jihad in Afghanistan were a major contributor to the rise of Islamist militancy in Libya, for instance.

The Washington Post interviewed a friend of Saber Khachnaoui, one of the dead attackers, who said the Tunisian government had had an eye on the young man for some time.

A friend of Khachnaoui’s family said in an interview that police detained three of the young man’s relatives in a town in central Tunisia. The friend, Nidal Abdelli, said that Khachnaoui, 19, disappeared about three months ago and that the Tunisian Interior Ministry later informed the family that he had traveled to Derna, in eastern Libya, apparently to receive training.

... Abdelli, 29, said the Khachnaouis are a poor family from the town of Sbetla in Kasserine province, which borders Algeria. Police have arrested Saber Khachnaoui’s father, sister and a brother, Abdelli said. He also stated that when Saber disappeared, his father notified police in Kasserine and the Interior Ministry in Tunis. Nonetheless, the young man managed to reenter the country. “He’s a kid,” Abdelli said of ­Saber. “He doesn’t know anything. But he’s a victim as much as he is a terrorist. He’s a pawn in a much bigger game.”

Tunisia emerged from decades of dictatorship in 2011, and has since had the brightest political transition of any of the so-called "Arab spring" countries. But the terrorist attack also has some worried about balancing security against civil liberties. Under the dictatorship, fighting "terrorism" wasn't often simply cover for suppressing dissent, as John Thorne wrote for the Monitor yesterday.

Leaders across the political spectrum have condemned the violence and called for national unity, while Tunisians massed in Tunis’ main boulevard Thursday for a march against terrorism. Earlier, Tunisians gathered outside the Bardo Museum, cheering when security forces escorted busloads of civilians to safety.

Tunisian efforts to enhance security may invite scrutiny. Few Tunisians have forgotten that former President Ben Ali used the threat of terrorism to justify building a police state during his nearly 25-year reign. According to a report last July by Human Rights Watch, the new draft anti-terrorism law is an improvement on Ben Ali’s anti-terrorism legislation, but includes vague language that could allow for abuse.

A report released last October by the Pew Research Center found that most Tunisians viewed political stability and a sound economy as more important than democracy. However, a majority of respondents also said that core elements of a free society – including fair courts, free elections, and the right to protest peacefully – were very important for Tunisia’s future.