NAIROBI, Kenya—Kenya’s economic boom is only as secure as its borders.

East Africa’s powerhouse was reminded of this over the weekend as heavily armed gunmen linked to a Somali Islamic militant group stormed one of Nairobi’s most exclusive malls, killing 68 people and taking hostages as the world watched the carnage.

Their target was not accidental: the shopping mall is a symbol of Kenya’s growing prosperity. And the individuals attacked were a cross-section of those who participated most fully in the economic growth. (Kenya’s GDP increased 4.6% in 2012, and 5.2% in the first quarter of 2013.) The attack was timed for Saturday morning to inflict maximum damage and destruction and targeted the high-profile Westgate mall typically frequented by expatriates, diplomats, and affluent Kenyans. These Kenyans, who benefited from economic advancement under former president Mwai Kibaki, have recently enjoyed an increase in spending power, and together with expatriates, have driven demand for property, luxury goods, fine dining opportunities, and the arts and services.

More from Quartz:
--The complete, concise history of al-Shabaab, the group behind the Kenyan mall attack
--Why a new rule allowing hedge funds to advertise could be the biggest change to US capital markets since the 1930s
--Cheat sheet: Here are the bits of Blackberry investors want to flip for a profit
--South America is the worst place to buy an iPad

But the attack made clear that the prosperity hasn’t been accompanied by sufficient investment in security and intelligence gathering. This was the nightmare terrorist and hostage scenario that security analysts and observers had been warning of ever since Kenya intervened militarily in Somalia in October 2011 to wage war on al-Shabaab. The Somali terrorist group ostensibly claimed responsibility for the attack in a tweet on Saturday evening,

“We have been in the crosshairs of these guys,” says Abdullahi Halakhe, an independent Horn of Africa analyst. “They have been warning us about this since 2011. We have not taken this seriously enough and we have underestimated their capacity. This marks an extension of the al-Shabaab battleground from Mogadishu and into Nairobi.”

Despite the warnings, analysts say the scale and the sophistication of the siege on Westgate mall took the government by surprise.

“We are not going to be business as usual,” says Rashid Abdi, an independent Horn of Africa analyst. “This was a big wakeup call. We are not dealing with a ragtag army but a formidable and deadly insurgency capable of this scale of attack. There is a culture of complacency, and Kenya has become a soft target for Al Shabaab.”

Referring to the August 1998 attacks on the US embassy in Kenya, the last major terrorist attack in the country, Abdi said:

“Since the US embassy attacks in 1998 there has been a lot of investment into revamping the agencies but why have we not seen any improvement? We have been getting training and expertise from the West and from sister agencies but have failed to see it translate into improved intelligence gathering and security.”

The latest attacks mark a low point in a year that has already been plagued by political tensions. The country in March avoided a repeat of the general election violence and conflict seen in the previous cycle. But the trials at the ICC of president Uhuru Kenyatta, and his deputy William Ruto continue to create political uncertainty.

There will surely be fallout from this weekend’s violence. The attack targeted the country’s affluent and expatriates, who could see it as a reason to move and invest elsewhere. And tourism could be hurt in the short term. Already, various advisories warn against all but essential travel, prompting Raila Odinga, the former prime minister and leader of the opposition, to tweet: “This is not the time to issue travel advisories. Terrorism is a global challenge that we must meet as a united front.”

What’s needed now is swift and decisive action to stem further terrorism and reestablish the confidence of Kenyans and expatriates alike. An elaborate plan to ensure security of the borders, and the capital, is vital.

We welcome your comments at ideas@qz.com.

Also on HuffPost:

Loading Slideshow...
  • It Spends A Huge Amount Of Money On Lobbying

    The National Rifle Association spent between <a href="http://www.policymic.com/articles/11823/james-eagan-holmes-gun-control-debate-nra-still-has-the-numbers-and-the-money" target="_blank">$1.5 million and $2.7 million on federal-level lobbying efforts between 2001 and 2010</a>, and an additional $7.2 million supporting candidates during the 2010 election, according to Policymic. Gun manufacturers themselves have contributed <a href="http://www.huffingtonpost.com/2013/01/11/nra-gun-control-firearms-industry-ties_n_2434142.html" target="_blank">up to $38.9 million to the NRA</a> since 2005.

  • It Profits From Tragedies

    After both the <a href="http://www.businessweek.com/articles/2012-07-24/colorado-gun-sales-surge-after-the-aurora-massacre" target="_blank">Aurora</a> and <a href="http://thinkprogress.org/justice/2013/03/07/1683771/gun-manufacturer-profits/" target="_blank">Newtown</a> massacres, the gun industry saw huge increases in sales.

  • It Pushes Military-Style Weapons

    Faced with a dwindling generation of hunters, the <a href="http://www.rollingstone.com/politics/news/the-gun-industrys-deadly-addiction-20130228" target="_blank">gun industry has actively promoted military-style weapons</a>, according to Rolling Stone. While sales of hunting style firearms have fallen to just a quarter of the total market, sales of assault rifles and handguns have surged.

  • Gun Control Legislation Has Passed Many Times Before

    The debate over gun control is hardly new. <a href="http://www.theblaze.com/stories/2013/02/12/in-america-some-say-guns-are-in-our-dna-but-is-history-on-the-side-of-gun-rights-or-gun-control/" target="_blank">Gun control legislation has been passed in 1927, 1934, 1968, 1986, 1993 and 1994</a>, according to The Blaze.

  • It Doesn't Represent Most Americans

    <a href="http://www.huffingtonpost.com/2013/01/16/gun-control-poll_n_2486116.html" target="_blank">Recent polls</a> have repeatedly shown that <a href="http://tv.msnbc.com/2013/04/03/morning-joe-poll-support-for-gun-control/" target="_blank">most Americans support stricter gun control.</a> However, the <a href="http://www.nbcchicago.com/blogs/ward-room/NRA-Anti-Gun-Poll-Results-Dont-Matter-202356331.html" target="_blank">NRA's chief lobbyist in Illinois</a> said that gun control poll results should have no impact on whether laws should change, NBC Chicago reports.

  • It Makes A LOT Of Guns

    Over the last 25 years, <a href="http://www.theblaze.com/stories/2013/03/26/guns-at-a-glance-the-top-commercial-firearms-makers-in-america/" target="_blank">100 million guns have been made in the United States</a>, The Blaze reports. In 2011 alone, the <a href="http://www.theblaze.com/stories/2013/03/26/nr-draft-how-important-are-guns-to-the-u-s-economy-for-starters-the-firearms-industry-employs-twice-as-many-americans-as-bailed-out-gm/" target="_blank">U.S. firearms industry manufactured over 8 million guns</a>. Compare that to the only <a href="http://www.reuters.com/article/2007/08/28/us-world-firearms-idUSL2834893820070828" target="_blank">6 million guns that were manufactured worldwide</a> in 2007.

  • It Fears The Zombie Apocalypse

    Gun manufacturers have been accused of using marketing ploys such as hyping up <a href="http://www.rollingstone.com/politics/pictures/the-gun-industrys-nine-most-outrageous-marketing-ploys-20130228/this-is-not-a-toy-0089544" target="_blank">Zombie apocalypse fears to target new customers</a>, Rolling Stone reports. <a href="http://www.zombie-defense.com/photos.html" target="_blank">Zombie Defense</a>, for example, is an entire company dedicated to selling firearms customized for the inevitable event when dead humans come back to life and attempt to destroy the world.

  • President Obama Has Been Good To Them

    Despite regular criticism of President Obama from the NRA and other pro-gun groups, Obama has actually <a href="http://www.time.com/time/politics/article/0,8599,2046592,00.html#ixzz1pDJ3yNPk" target="_blank">expanded gun rights</a> during his first term. Fear that <a href="http://www.huffingtonpost.com/2012/02/21/obama-greatest-gun-salesman-in-america_n_1291381.html" target="_blank">Obama will crack down on guns</a> has actually led to big revenue increases for gun manufacturers, prompting some to ironically call him <a href="http://www.huffingtonpost.com/2012/12/20/obama-gun-stimulus-twitter_n_2338563.html" target="_blank">"the greatest gun salesman in America."</a>

  • It Will Accessorize To Attract Women

    Women remain a largely untapped demographic for the gun industry, which is why manufacturers have recently stepped up <a href="http://www.sfgate.com/nation/article/For-gun-industry-women-a-major-market-4267485.php" target="_blank">efforts to attract new female customers</a>. Apparently this <a href="http://www.gungoddess.com/ar-15-pink-stock-set/" target="_blank">pink assault rifle stock set (pictured) from GunGoddess.com</a> is one way the industry hopes to entice women to buy guns. "My intention with offering these products is to encourage women to discover the enjoyment they can get from shooting and the shooting sports, while at the same time not losing sight of the most important goal - taking responsibility for their own protection and learning critical self defense skills," Athena Means, owner of GunGoddess.com, wrote The Huffington Post in an email.

  • NRA Members Support Background Checks

    A 2012 poll revealed that <a href="http://www.huffingtonpost.com/2013/01/11/nra-gun-control-firearms-industry-ties_n_2434142.html" target="_blank">74 percent of NRA members support mandatory background checks</a> for all gun purchases, despite the organization's public opposition of such measures, according to The Huffington Post.

  • It Wants Your Children

    <a href="http://www.nytimes.com/2013/01/27/us/selling-a-new-generation-on-guns.html?hp" target="_blank">Gun manufacturers have stepped up efforts to market to children</a> by donating to youth groups, sponsoring youth events and advertising military style rifles directly to younger shooters, according to The New York Times.

  • It Breaks Promises

    Smith & Wesson signed a pact with the Clinton administration to cease making weapons that hold more than 10 bullet magazines. It later <a href="http://www.huffingtonpost.com/2012/12/21/smith-wesson-clinton-bush-nra_n_2348503.html" target="_blank">broke that agreement when profits plummeted</a>, The Huffington Post reports. A request for comment from Smith & Wesson was not returned.

  • The Second Amendment Didn't Used To Apply To Individuals

    While the Second Amendment does indeed say that "the right of the people to keep and bear arms shall not be infringed,” that was <a href="http://www.newyorker.com/online/blogs/comment/2012/12/jeffrey-toobin-second-amendment.html" target="_blank">historically interpreted as the right of militias to do so</a>, according to The New Yorker. It was not until a 2008 Supreme Court ruling, commonly referred to as the Heller decision, that the individual right to bear arms was guaranteed under federal law. <em>This slide has been updated to include additional information about the Heller decision.</em>

  • It Picks Losers

    At over $1 million, the <a href="http://www.opensecrets.org/industries/indus.php?ind=Q13" target="_blank">NRA donated more money to Mitt Romney</a> than it did to any other individual in 2011 to 2012, according to Open-Secrets.com.

  • One Of Its CEOs May Threaten To Kill You

    James Yeager, CEO of weapons training company Tactical response, infamously threatened to <a href="http://www.huffingtonpost.com/2013/01/10/james-yeager-start-killing-people-obama-gun-policy_n_2448751.html" target="_blank">"start killing people"</a> over the debate on gun control before <a href="http://www.huffingtonpost.com/2013/01/15/james-yeager-tactical-response_n_2478594.html" target="_blank">ultimately apologizing</a>.