At least 12 people, including four Americans, were killed and 27 others wounded when a suicide bomber rammed a vehicle packed with explosives into an African Union convoy southwest of the Somali capital Mogadishu.

The attack, the latest in a wave of violence, comes exactly one week after a US air strike killed the chief of the al-Qaeda-linked al-Shabab group, prompting threats of retaliation from the group.

Speaking to Al Jazeera, al-Shabab's military operations spokesman claimed responsibility for the attack that took place near the town of Afgoye, about 30km northwest from Mogadishu.

Two soldiers from AMISOM - the African Union Mission in Somalia -  were wounded in the attack, the local governor said.

'Americans targeted'

The al-Shabab spokesman said the target of the attack was an American commander who trains special forces in Mogadishu.

"We succeeded in killing him and three other Americans. Also a South African mercenary died in the attack." Abduaziz Abu Muscab told Al Jazeera.

"It was a retaliation for the killing of our leader. This is not going to be the last attack targeting Americans." Abu Muscab said.

Al Jazeera's Mohammed Adow reports from the frontline town of Fidow

Witnesses reported a huge blast and wave of fire, with civilians on the busy highway between the town and the capital caught up in the explosion.

"I saw two minibuses with pools of blood, many civilians were killed," said Ali Muhidin, a witness told the AFP news agency. "The explosion was enormous."

A second car bomb, also claimed by al-Shabab, targeted Somali government soldiers in Elasha Biyaha about 15km outside the capital. 

Somalia's government on Saturday warned of a wave of retaliatory attacks by the al-Shabab following the killing of their commander Ahmed Abdi Godane.