Five and a half years ago, gunmen stormed the Westgate mall in Nairobi, killing 67 people and prompting a days-long standoff with police. The attack rattled Kenya and the entire region, prompting a reevaluation of security in public spaces in East Africa.

Then, on Tuesday, another group of gunmen stormed a popular hotel and shopping complex less than a mile from the Westgate mall, which reopened in 2015. The rampage left at least 21 dead, according to the official death toll, which was updated Wednesday, prompting questions about why the increased security measures implemented after the 2013 attack were not enough to prevent another massacre.

Al-Shabab, a militant group based in Somalia and linked to al-Qaeda, has asserted responsibility for the Tuesday attack.

In Nairobi and other major metropolitan areas in East Africa, malls, supermarkets and hotels are typically protected by gates and staffed with security guards. It is routine for cars that visit high-end complexes regularly to be checked multiple times a day; security officials often run mirrors under vehicles to check for explosives before allowing them to enter. In Nairobi, passengers headed toward Jomo Kenyatta International Airport must exit their vehicles far from the entrance and pass through metal detectors on the side of the road while their vehicles are checked separately.

“You’re trying to balance convenience and ease of access and not creating hardship in daily lives with protecting from an incident like this,” said Omar Mahmood, a senior researcher at the Institute for Security Studies in Addis Ababa, Ethiopia.

But even with increased security, “the reality is when you have an actor as sophisticated and capable as al-Shabab that’s determined to attack you, unfortunately, they’re going to get past you,” he said.

Nairobi is a major international hub, home to many embassies, businesses and hotels. In 1998, the U.S. embassies in Nairobi and Tanzania were targeted by al-Qaeda militants. More than 200 people were killed and thousands were injured, the vast majority of them in the Nairobi attack.

Al-Shabab has repeatedly attacked Kenya, which deploys troops to Somalia as part of an African Union peacekeeping mission there. Al-Shabab militants have killed hundreds in Kenya in recent years, including at Garissa University, where gunmen killed nearly 150 people in 2015.

Mark Bellamy, the U.S. ambassador to Kenya from 2003 to 2006, told The Washington Post that although revamped security in recent years may have deterred some terrorists, it is not a surprise that “there’s been another attack like this against an upscale target.”

“If you accept that this is a problem that Kenya is going to continue to have,” Bellamy said, then authorities need to “harden those targets . . . [and] have an effective response.”

“It’s probably not going to be possible to prevent such attacks,” he added. “But it should be possible to make them less deadly.”

Mahmood said that Kenyan security forces have thwarted other attacks in recent years and that finding ways to prevent sporadic violence is a challenge for any country facing such threats. He said he expected increased security and vigilance in the aftermath of Tuesday’s attack. One “unfortunate consequence of that could be higher walls, more sort of physical security barriers,” he said.

But as is the case elsewhere, he said, there will be a “natural tendency over time for that to dissipate.”

Read more