Explosions and gunfire were heard as troops battled militiamen loyal to the former warlord.
The African Union military force in Somalia, AMISOM, said the raid was carried out near the home of a former district commissioner, Ahmed Daci. The AU said that Daci's militia fired at AMISOM, precipitating a firefight.
"During the operation, the militia was overpowered and 20 were arrested, 15 guns and an assortment of ammunition recovered," AMISOM said on its Twitter feed.
The dead included four civilians, two militia members and one soldier, said police officer Capt Mohammed Hussein. Eight people were wounded, he said.
Also Read
Launched last week, the Somali government's disarmament campaign is an attempt to reduce the number of weapons in the violence-prone city. The government says some 500 guns were recovered during the first four operations. Today's operation was the fifth.
The target of the government's disarmament campaign is the feared and powerful clan warlords. The government says the raids are taking place to ensure that the city's arms don't fall in the hands of al-Shabab militants.
"We are ready to lay down weapons for the pacification of Mogadishu, but this kind of tactic will not work," said Abdullahi Sheikh Hassan, a Somali politician whose home was also raided today.
Fatima Ali, a Mogadishu mother of four, said today's battle sent everyone in her house to the ground for safety. "We are very terrified," she said. "We haven't heard something like this for some time."