By Vivienne Walt
March 22, 2015

The two men who strolled into the National Bardo Museum in Tunis on March 18 looked leisurely and relaxed. Other than the Kalashnikov rifles in their hands, there was no sense that a massacre was about to unfold. Instead, the museum’s security camera footage, posted on the Tunisian Interior Ministry’s Facebook page late Saturday, shows Yassine Laabidi and Hatem Khachnaoui walking through the deserted lobby for several seconds, barely glancing around on their way to the room where dozens of tourists had come to see ancient mosaics and artifacts. When the two run into a third man coming down the stairs, their brief encounter is cordial.

So where were the security guards charged with protecting one of North Africa’s most prestigious museums and Tunisia’s parliament, which sits on the same compound? Nowhere in sight, a top Tunisian politician said this weekend, in a series of admissions from officials that major security flaws led to last Wednesday’s bloodshed. Twenty tourists from Japan, Italy, Colombia, Spain, France, Australia, Poland and Britain were killed, and about 50 others wounded. Abdelfattah Mourou, deputy speaker of Tunisia’s parliament, told AFP that of the four policemen posted outside the museum and parliament—highly strategic buildings—two of them were off drinking coffee nearby, a third was eating a midday snack “and the fourth had not turned up,” Mourou said. “It is a big failure.”

That is an understatement.

As Tunisia reels from the attack, for which the militant group Islamic State of Iraq and Greater Syria (ISIS) has claimed responsibility, officials face tough questions from Western governments and Tunisians themselves about how gunmen met no resistance, despite the fact that officials have warned for months that hundreds of jihadists were plotting violent attacks aimed at undoing their new democracy. The two men died in a blaze of gunfire when security forces stormed the museum about three hours after the attack began.

President Beji Caid Essebsi said on Sunday that a third suspected attacker was still on the loose, though he did not provide any details. Security forces said they had arrested 20 jihadists, with 10 of them directly connected to the museum attack. But the President said one key figure in the attack is still missing. “There were for certain three terrorists,” Essebsi told the French network iTele in a televised interview. “There is one on the run. He will not get far.”

Accounting for how security failed so drastically is crucial for Tunisia, whose 11 million people depend heavily on Western tourists. The country’s tourism industry accounted for 7% of its GDP before the Arab Spring and still provides tens of thousands of jobs for young Tunisians, including one of the now-dead gunmen, Laabidi.

In their rush to reassure foreigners that the country is safe, officials say they have been struggling to build an effective security apparatus, while at the same time forging a new democracy; the 2011 revolution drove out Tunisia’s longtime authoritarian leader, Zine el Abidine Ben Ali, and sparked the Arab Spring uprisings across the region.

Yet there is another crucial factor: political will. Essebsi said Saturday that Islamist politicians who ran Tunisia’s government until January were wary of cracking down on suspected jihadists; the major Islamic party, Ennahda, was banned under Ben Ali’s reign, then took power after the revolution but lost their majority last October. “There has been much too much leniency these past few years, especially by the Islamist government while it was in power,” Essebsi told Paris Match.

Looking back, there appears to be some truth in that statement.

In September 2012, just after the attack on the U.S. consulate in Benghazi, Libya, for example, hundreds of hardliners stormed the American embassy in Tunis and hoisted the flag associated with al-Qaeda, without intervention from security forces. The mob was finally beaten back when then-President Moncef Marzouki—a secular liberal at odds politically with the Islamic party—deployed the presidential guards after receiving a frantic call from then-Secretary of State Hillary Clinton, according to Marzouki’s account to TIME in a palace interview a few days later. When TIME asked Ennahda head Rachid Ghannouchi, whose party was in power, why his government didn’t crack down on Salafists, he said, “We don’t judge people based on what ideology they follow, but on their actions.”

Eighteen months on, those actions have now shaken Tunisia, and the task of stopping jihadist threats seems more difficult than it was back in 2012. Of the more than 3,000 Tunisians estimated to have fought with jihadist groups in Syria and Iraq, officials say about 500 are back home. But there is no need for jihadists to travel far to train for battle. Tunisia is wedged between Algeria, where al-Qaeda has long been active, and Libya, where ISIS has seized on the absence of any functional central government to launch attacks. Tunisian officials have described the gunmen as Salafists, and said they received weapons training last December in Libya, along with other Tunisians.

In an email to TIME on Sunday, Ghannouchi, whose Ennahda party has about 27% of seats in parliament, deplored last Wednesday’s attack, saying the country needs a major counter-terrorism strategy on all levels. “Terrorism must be a national cause above political differences,” he wrote. “The performance of the security and military forces has been improving and achieving greater proficiency and effectiveness, however, the attack clearly shows that there are shortcomings.”

Indeed, security forces have been battling jihadists for months, with about 23 killed last year in skirmishes in the remote mountains near the Algerian border. Struggling to cope, the government announced a new counter-terrorism force last December. Just two weeks ago, Algeria sent air-to-ground missiles to Tunisia, for the purpose at bombing terrorist bases in the remote mountains of the country, according to an Algerian security official—a sign, perhaps, that Tunisia was weighing much tougher action against jihadists.

Essebsi admitted to Paris Match that “among the unemployed and often desperate youth, the jihad has had some appeal.” Similarly, Ghannouchi said in his email to TIME that Tunisia needed to “provide hope for young people in finding jobs and creating a better future for them.”

Yet that might not have stopped Laabidi and Khachnaoui from massacring tourists at the museum. Laabidi’s family said he was a middle-class urbanite who had studied French, had a stable job and showed no outward sign of radicalism. “My brother was a bon vivant,” Laabidi’s older brother told AFP, stunned at the man’s bloody death. He “enjoyed a drink with mates and would joke around with everyone. He had no complex whatsoever.”

Contact us at editors@time.com.

SPONSORED FINANCIAL CONTENT

Read More From TIME

EDIT POST