"It took place at noon on the 27th of Ramadan, the best blessing. We knew the infidel government and AU troops planned to attack us after the holy month. This is a message to them."

'Deafening thunder'

Nabhan, 28, had been allied with al-Shabab, which the US accuses of being al-Qaeda's proxy in Somalia.

In depth

 Profile: Sharif Ahmed
 Inside Story: What next for Somalia
 Riz Khan: Somalia - From bad to worse
Al-Shabab: Somali fighters undeterred
 Somalia at a crossroads

Witnesses said two vehicles with UN markings entered the coastal airport base of the 5,000-strong African Union Mission in Somalia (Amisom) mission - comprised of troops from Burundi and Uganda - unchallenged before blowing up.

One witness said: "We thought they were real UN cars carrying white people, but moments later deafening thunder shook the ground,"

"The area was covered with flames and clouds of smoke."

Nicolas Bwakira, the AU's special representative for Somalia, said in a statement: "At least two bombs exploded at the force headquarters at about midday ... causing injuries and damage to Amisom peacekeepers, facilities and equipment.

"Despite this barbaric attack, the African Union remains resolute in its commitment to support the Somali people and the ... government in their peace and reconciliation efforts."

Hostage demands

The bombings came just hours after al-Shabab issued demands in return for the release of a French security consultant the group is holding hostage, including an immediate end to French support for Somalia's fragile government.

The French hostage is one of two security consultants kidnapped by gunmen in Mogadishu in July.

Al Shabab said the attacks were revenge for the killing of Nabhan [AFP] 

His colleague managed to escape on August 26.

In return for his release, al-Shabab demanded the "immediate cessation of any political or military support to the apostate government of Somalia and the withdrawal of all its security advisers in Somalia", the rebels said in a statement.

They demanded the withdrawal of AU troops supporting President Sheikh Sharif Ahmed's administration and the departure of French warships trying to stamp out piracy in Somali waters.

The group's statement also called for the release of prisoners in other countries to be named later.

Fighting in Somalia has killed more than 18,000 civilians since the start of 2007 and left another 1.5 million homeless.

Thursday's attack was the worst on AU peacekeepers since 11 Burundians were killed and 28 wounded in February by two suicide bombers who infiltrated their base.