analysisBy Magnus Taylor
Most visitors who have spent any length of time in Nairobi have been to the Westgate Centre. This US-style mall complex, situated in the wealthy Westlands region of the city, has profited in recent years from the plentiful expat and middle class Kenyan shilling.
However, it's not a place I have much love for - the clear delineation of Nairobi's haves and have-nots is marked out by the rich folk who enter up its steps and the poor street-hawkers who hang about in the parking lot and try to sell you stuff.
However, I can't deny that during trips to the city I become part of this dynamic and, like most, I've spent time in the air-conditioned comfort of Art Cafe (a posh Nairobi chain of coffee shops) using the free wifi and, when I was there during March's general election, filing a couple of pieces.
That such a violent and abhorrent act should take place in Westgate was no accident - it was carefully chosen by people who knew how they could have the greatest impact on Kenya and get the most coverage internationally: strike where the rich and the foreign hang out.
This is a place that symbolises the country's confident new wealth: The growing economy, the two-fingers-to-the-west election of ICC-indicted Uhuru Kenyatta, the evident, but incomplete, 'Africa rising' narrative. But it also demonstrates the extent of the Somalia-shaped problem Kenya has on its doorstep.
For the first time in its history Kenya has an occupying military force in another country. When its troops crossed the Somali border in 2011, and eventually took Kismayo earlier this year, the feeling was that this assertive change in foreign policy was going to cause some kind of reaction.
Abdullahi Boru Halake, a Kenyan political analyst says that "Nairobi has been in the crosshairs of Al Shabaab since Kenyan forces intervened in Somalia October 2011. We had closely contested elections and the ongoing ICC cases that took much of the attention. In a way, up to this time, we have dodged bullets/bombs."
Stig Jarle Hansen, author of Al Shabaab in Somalia, states that rumours of Al Shabaab's demise have always been greatly exaggerated: "Shabaab has lost teritory and has faced a conflict over Omar Hamami, but it is better than ever in conducting terrorist attacks... conventional means are more exhausted."
Indeed, up until now Nairobi seemed to have got off fairly lightly with a few grenade attacks (generally on bars), which one Kenyan journalist speculated to me was, in part, a sign of local business disputes, rather than Islamic militancy.
There was also a nasty matatu bombing in Eastleigh, the predominantly Somali district of the city. Eastleigh has also suffered from a police crackdown on its population, who have for many years been distrusted by other Kenyans, both for their connection to the crime and warlordism of Somalia, but also for their success in business.
A noticeable security increase in shops was the most obvious consequence of the Kenyan invasion, with Al Shabaab continually asserting that they would drive the occupiers into the sea. But the efficacy of placing a few more guards with metal detectors on the doors seemed debateable. This would be unlikely to deter a really determined attacker, as Westgate now seems to show.
The eastern Somali region of the country was more obviously impacted, with a number of attacks taking place near the border, particularly in the town of Garissa, which included a mass shooting at a church in July 2012 that killed 15 people.
In the understandable drama of the last 2 days (which exceeds anything Kenya has experienced since the US embassy bombing in 1998) we should not forget these lower-profile killings.
Kenya has a genuine security problem with Somalia which is unlikely to be addressed by the withdrawal of Kenyan forces from the country. Hallake, again, describes the Westgate attack as being "a case of a systemic intelligence failure which is a function of intelligence aligning itself with politics rather than being a professional outfit ... the case for an enhanced and deepened security sector reform has never been this urgent." Stig Hansen says that Kenya is "not even close" to disrupting Shabaab's capacity to carry out sophisticated attacks of this nature.
To fight this threat Kenya is going to need more international support with its intelligence and counter-terrorism strategy. This is something western countries are well-qualified and capable of providing.
No one wants East Africa's most important city to descend further into fear and paranoia given its key role as a regional hub for business, diplomacy and the development sector. Kenya should also avoid a knee-jerk crackdown on its Somali population, something that has the potential to stimulate yet further violence, which is no doubt what the attackers intended.
So this is probably going to mean more engagement with the Kenyan security and intelligence services at a time when western powers have been trying to keep the new government at arm's length whilst its two top men are on trial at the ICC.
If the Westgate attack shows us anything it's that Al Shabaab remains organised and dangerous and Kenya's Somalia problem is nowhere near solved.
Magnus Taylor is Editor of African Arguments.