Tuesday's clashes followed a separate suicide car bomb attack in Mogadishu, Somalia's capital, by al-Shabab fighters on the base of African Union peacekeepers.
The peacekeepers fired on the explosives-laden vehicle, killing its three occupants.
After the attack, the fighters engaged government soldiers and militiamen allied to the UN-backed government of Sharif Sheikh Ahmed as they moved between bases in southern Mogadishu.
The clash triggered a four-hour battle.
Ali Araf, a tailor in the area, said he counted the bodies of eight people, adding that he was slightly wounded during the battle in which both sides pounded each other with mortars.
Ali Muse, the head of Mogadishu's ambulance service, said his group had counted six other bodies and took about 40 wounded people to dfferent hospitals.
Sheikh Ali Mohamoud Rage, al-Shabab's spokesman, said the attack was in retaliation for the recent killing of senior al-Qaeda commanders in Iraq.
"We have carried out a holy suicide attack against the enemy of Allah in Mogadishu today and we destroyed the bank building where they were stationed," Rage said.
"This attack was a retaliation for the killing of our mujahedin brothers Abu Omar al-Baghdadi and Abu al-Masri ... in Iraq."
The 5,000-strong AU force, with troops from Uganda and Burundi, is regularly targeted by al-Shabab fighters who have vowed to overthrow the transitional government.