For a group generally reckoned to be in retreat in its Somalia stronghold, al-Shabab has demonstrated in no uncertain terms that it remains a jihadist force to be reckoned with. Its siege of the Westgate shopping mall in Nairobi at the weekend was planned with precision, and with an eye to generating the maximum possible shock and outrage - particularly in Britain. Superficially, the Nairobi attack bears some similarities with the co-ordinated shootings and bombings carried out by Lashkar-e-Taiba in Mumbai in 2008 on targets frequented by westerners. The al-Shabab attackers seem to have gone one better, however, marking out hostages for death according to how they responded to a chilling series of questions intended to determine their knowledge of Islam.
Al-Shabab (the name means "youth'' in Arabic) was originally the youth wing of the fundamentalist Islamic Courts Union, which sought to set up an Islamic government ruled by sharia courts in Somalia in 2000. However, its reign was brief, in large part because it alienated supporters with its fundamentalist outlook. The Islamic Courts Union retreated towards the Kenyan border late in 2006 after the country's transitional federal government and US-backed Ethiopian troops took control of Somalia's capital, Mogadishu. Al-Shabab, however resolved to carry on the fight against those it deemed to be enemies of Islam and "foreign occupiers''.
Somalis angered by the heavy-handed tactics of Ethiopian troops were initially drawn to al-Shabab's ranks, and the group waged a campaign of bombings - including suicide attacks - in Mogadishu and in central and northern Somalia. Most were aimed at government officials, allies of the transitional government and the African Union Mission in Somalia.
The group also made common cause with al-Qaeda franchises in Yemen and northern Africa, swapping tactics, training, financing and establishing cells in neighbouring Uganda and Kenya. Al-Shabab became notable, too, for its use of video, radio and the internet to bolster support among Somalis and international jihadists. So successful was this tactic that foreigners (including some Australians) were drawn to the region to train and fight. Young men from the Somali diaspora, particularly those that had settled in the US, have also found their way to al-Shabab's ranks.
Like the Islamic Courts Union before it, however, al-Shabab's popularity in southern Somalia began to decline as a result of its harsh rule. Not only did it declare gold and silver dental fillings un-Islamic, for instance, but it also banned women from wearing bras. Concurrent with this, a beefed-up African Union troop presence in Somalia began pressing in on al-Shabab territory. At about this time, 2010, the group turned its attention to targets outside Somalia, reportedly organising the twin suicide bombing of nightclubs in Uganda. When Kenya (with the support of the US) sent troops into Somalia to fight al-Shabab in October 2011, it too found itself the focus of a series of attacks against civilian targets. The military assault, however, evicted al-Shabab from the port city of Kismayo in September last year, all but ending its dream of converting Somalia into a utopian Islamist state.
The attack on the Westgate mall fits the pattern of recent al-Shabab reprisals, though of course it is a significant step up in terms of scale and deadliness. Some commentators have attributed this change of tactic to al-Shabab's formal merger with al-Qaeda, announced in February 2012. Nonetheless, it's not clear whether the Nairobi attack was evidence of al-Shabab's rejuvenation or a defiant, desperate show of strength to disguise its long-term decline. That the group's rank and file come from disparate clans, that its leadership is susceptible to clan politics and shifting alliances and that most of its fighters are predominantly interested in fighting the transitional federal government and are not supportive of global jihad, suggest the latter.
For all that the Westgate attack will weaken the al-Shabab cause in the eyes of moderate Muslims, extreme Islam remains a problem in East Africa. It underlines yet again why governments in the region (with help from the West) must attend to the root causes (oppression, corruption and weak institutions) that allow it to flourish.