By Vivienne Walt
Updated: March 20, 2015 8:23 AM ET | Originally published: March 19, 2015

With Tunisians reeling from the terror attack that killed 18 foreign tourists on Wednesday in the heart of their capital, the government scrambled to try avert any further attacks, while accounting for how gunmen were able to mount the deadliest operation in decades, in broad daylight and with seemingly little difficulty.

Late Wednesday, security forces arrested nine people, five of whom were believed to be directly connected to the attack on the National Bardo Museum, according to Tunisia’s presidential office, which said the suspects were part of a terror “cell.” In the worst attack on foreigners in 13 years—and with the highest death toll perhaps ever—two gunmen cornered the tourists in the museum parking lot early Wednesday afternoon, massacring several of them, before holding several others under siege inside. Security forces stormed the building about four hours later, killing the attackers and freeing the hostages. Among those killed were tourists from Spain, Italy, Poland and Germany, most of whom were passengers on a Mediterranean cruise-liner that had stopped for a day of sight seeing in Tunis.

As the shock sank in on Wednesday night, 88-year-old Tunisian President Beji Caid Essebsi, who took office only in January after the country’s first presidential elections, vowed an all-out fight against jihadists. Tunisia, he said in a televised address, was “in a war with terror, and these savage minority groups will not frighten us. The fight against them will continue until they are exterminated.” Parliament on Thursday pledged more funds to beef up security and intelligence.

Yet despite the aggressive talk, Tunisians wondered whether their country’s security has been too lax, and how the growing threats within this small country of 11 million people had gone unnoticed. On Thursday, Tunisian Prime Minister Habib Essid admitted that one of the two gunman had been under surveillance, although it appeared that Tunisia’s security forces did not have information linking him to a specific militant organization. “He was known to the security services, he was flagged and monitored,” said Essid, speaking to the French network RTL. “We are in the process of further investigation. We cannot say which organization they belong to.”

Despite that, early suspicions of who was behind Wednesday’s attack point to the Islamic State of Iraq and greater Syria (ISIS). Tunisian analysts speculated on Wednesday that the attack on the museum might have been timed in retaliation for the death earlier this week of Ahmed al-Rouissi, one of Tunisia’s most wanted militants, who was killed fighting with ISIS in the Libyan city of Sirt.

On Thursday, the SITE Intelligence Group, which monitors jihadist organizations, provided an English translation of an ISIS audio statement to the New York Times, in which the organization claimed responsibility for the tourist massacre, and warned of more violence to come. “We tell the apostates who sit on the chest of Muslim Tunisia: Wait for the glad tidings of what will harm you, impure ones, for what you have seen today is the first drop of the rain, God willing,” the paper quoted the statement saying. “You will not enjoy security, nor be pleased with peace, while the Islamic State has men like these.”

There might also have been a warning shortly before the attack. A few hours before the gunmen opened fire at the museum, an ISIS supporter tweeted, “Coming good news to Tunisia’s Muslims,” according to Britain’s Daily Mail. The tweeter, whose handle is @riff0BA, promised “a shock to the disbelievers and the hypocrites, especially those who claim to be cultured.'” According to the Associated Press, two of the gunman involved in the attack left Tunisia in December and received weapons training in Libya.

When gunfire exploded on Wednesday afternoon, residents in Tunis could scarcely believe that their breezy seaside city was under a terrorist attack. Sayida Ounissi, 28, a member of parliament for the Islamist political party Ennahda, told TIME on Thursday that many of her colleagues in parliament at first brushed off the security alert, not believing that they might be in danger; the lawmakers were in session, discussing new anti-terrorism measures, when the gunmen attacked the nearby National Bardo Museum. “Despite all of the threats and assassinations, most of us living in the city think of terrorism as something happening outside, in Iraq and Libya,” Ounissi said, by phone from Tunis. “I was one of the rare people who took the alert seriously.” She quickly began to leave the parliament, followed by her colleagues.

That illusion of safety has been severely shaken. Indeed, Tunisian analysts believe that jihadist organizations see the country and its democratically elected government as a particularly juicy target. That is because Tunisia’s 2011 Jasmine Revolution sparked a wave of uprisings in Egypt, Libya, Syria, and Yemen, emerging as the sole democracy from the Arab Spring.

Wedged between Algeria, where al-Qaeda affiliates are active, and unstable Libya, where ISIS is waging increasing attacks, tiny Tunisia seems highly vulnerable. Tunisian officials estimate that more than 3,000 citizens have fought with jihadist groups in Iraq and Syria over the past four years—making it one of the biggest sources of foreign fighters in the world. About 500 of them have since returned. Battle-trained, some could be planning to wage attacks at home. “We know very well that the Tunisia model is not to everyone’s satisfaction,” says Ounissi. “You have a Muslim democracy in a region with extremist organizations, who do not want freedom and democracy.”

Still, Wednesday’s attacks appeared to have inspired intense determination among Tunisians to protect their democratic revolution. After dark on Wednesday thousands of people poured into Tunis’s main boulevard, Avenue Habib Bouguiba, signing the national anthem and holding handwritten signs proclaiming that terrorism would not prevail. Others gathered in a candlelight vigil outside the Bardo Museum, shaken by the gruesome bloodshed on the city’s streets. “You can see the sense of shock on everyone’s faces,” says Jerry Sorkin, an American tour operator who has lived in Tunis for many years, and runs a cultural-tour company called TunisUSA. “People are not going to tolerate the violence,” he says, speaking by phone from the capital on Thursday. “They have gone so far in forming a democracy.”

Nonetheless, Wednesday’s attacks are likely to have a drastic effect on Tunisia, especially on the vital tourist industry, which has suffered since the Arab Spring. The travel industry makes up about seven percent of the country’s economy, and employs nearly 500,000 people. A two-hour flight from Paris, Tunisia’s sun-baked coastline drew millions of tourists before the revolution. Tunisia was hoping that this year’s summer would mark an upturn in tourists, many of whom have stayed away since 2011. But Sorkin says he had received several calls and emails since Wednesday from nervous clients who have booked tours to Tunisia. ” All we can tell them is, we really think this is an isolated situation,” he says.

Tunisians are hoping that is the case. On Thursday, Tunisia’s former Minister of Information Oussama Romdani, who served under Ben Ali, sent TIME an email titled simply, “how to help after the attack.” Inside was a photograph of a sunny Mediterranean beach, with the words: “Keep calm and visit Tunisia.”

Contact us at editors@time.com.

SPONSORED FINANCIAL CONTENT

Read More From TIME

EDIT POST