The Shebab's bloody siege of a mall in Kenya confirms the Somali group's successful transformation from a guerrilla army into a leaner organisation focused on terrorist attacks, analysts said.

The September 21 raid and ensuing hostage crisis that killed at least 67 people was the most spectacular in the group's seven years of existence and boosted the Shebab's prestige in the jihadi world.

Shebab supremo Ahmed Abdi Godane on Wednesday described the carnage at the upscale mall in which several foreigners and some of the Kenyan president's relatives died as a "historic achievement."

The movement's co-founder warned of more bloodshed if Kenya failed to withdraw the troops that it sent in two years ago who are now part of the African Union force (AMISOM) propping up the pro-Western Somali government.

The Shebab's raid on a civilian target such as a mall packed with families in neighbouring Kenya was seen by some as a sign of the group's weakness on the home front but other analysts said it has never been more effective.

"When it abandoned fixed positions in Mogadishu two years ago... the Shebab decided it should no longer seek to confront AMISOM head-on. It decided to become a terrorist organisation," said a Western expert whose research focuses on the Shebab, speaking to AFP on condition of anonymity.

The expert said the Shebab knew they couldn't afford a fully-fledged conventional war against AMISOM and were also confident that government forces were not even close to becoming a credible Somali alternative.

Cedric Barnes, Horn of Africa project director at the ICG think tank, said the attack was evidence of the group's growing strength.

"Shebab keeping forces in several parts of Somalia and at the same time carrying out a complex attack in Kenya that would have taken at least a year to prepare: does that suggest an organisation that is on its knees?" he said.

'Nobody can crush the Shebab today'

Over the past six months, the Shebab carried out devastating attacks in Mogadishu targeting the main courthouse, a UN compound in Mogadishu and Turkish interests, as well as an ambush on the president's convoy. And in January the group fought off a hostage-rescue attempt by French commandos.

"It's been around one 'complex' attack a month lately, it's a pace we've never seen before," said the anonymous Western analyst.

The Westgate mall attack, the Shebab's most high-profile abroad since it struck Kampala in 2010, generated a number of claims on the Internet that could be construed as confusion or dissidence within the group.

But Barnes said there was no doubt Godane called the shots.

A UN security report echoed witness accounts suggesting that most of the gunmen who stormed the upscale mall on Saturday were ethnic Somalis, including several Kenyans, who may belong to an outfit calling itself Hijra.

Barnes said Hijra was "a convenient name for long-standing networks in East Africa" that can be tapped into by Shebab.

"Hijra is part of the wider Shebab movement but not of its central organisation," said Stig Jarle Hansen, a Norwegian academic who has studied Somalia for years and recently published "Al-Shabaab in Somalia."

Hansen said that Kenyans were increasingly well represented in top Shebab circles and noted that Swahili, which is spoken mainly in Kenya and Tanzania, was becoming the group's second working language.

"The Shebab's focus on Kenya has been much stronger recently, it is reflected in the leadership and the decisions it makes," he said.

Godane has recently sidelined commanders who were also Somali tribal leaders to beef up the Amniyat (secret service), which he uses as a kind of Praetorian guard that answers only to him.

"Godane has been steering Shebab, he seems to have a very clear idea of what he wants to achieve," said Barnes.

Hansen said a streamlined Shebab leadership had made it more versatile and able to juggle its two agendas: battling foreign-backed government troops for control of Somalia while enhancing its standing in global jihad.

"Godane has brought everything closer to him. He now runs a lighter, tighter and more nimble machine," Hansen said.

"The fact is that AMISOM cannot control the Somali countryside. But there has to be a functioning security force there. Yet pro-government forces would have to be multi-clan and paid and they're not," he said.

"Nobody can vanquish them there. Nobody can crush the Shebab today."