"Three of the victims died when a mortar shell struck their house."
On Tuesday Somali government forces pushed armed opposition groups out of two districts of Mogadishu after bloody battles, residents and officials said.
"We have swept them from the area. Madina and Dharkenley districts are now in our hands," Abdiqadir Odweyne, a senior police officer, told the Reuters news agency.
Officials said that security forces had also regained control of a police station in the Yaqshid district, north of Mogadishu, from opposition fighters.
Residents reported seeing dozens of bodies in the streets of the city after the fighting, but no confirmed death toll was immediately available.
Fourteen out of Mogadishu's 16 neighbourhoods are now under government control, according to Mohammed Abdi Gandi, Somalia's defence minister.
"That means we are making progress," he said.
"We presently have the situation well under control and we have enough soldiers to hold on and repel the extremist aggression on the country."
But Abdullah Youssef, the secretary-general of Hizbul Islam, an armed group, told Al Jazeera that the opposition forces would regain any ground they had lost.
"If we were the ones who initiated the attack, the fighting would have been next to Mecca street and the presidential palace. But we assure you that they will have to retreat," he said.
Stepped up attacks
Government soldiers launched an offensive last month in an attempt to seize large areas of Mogadishu from the control of fighters who wish to impose a stricter form of Islamic law on the country.
Hizbul Islam has allied with al-Shabab, another armed group, in an attempt to force the interim government from power, also accusing Ahmed of being a traitor because he signed a UN peace deal in January and joined the government.
Ahmed was previously leader of the Islamic Courts Union, which seized much of south and central Somalia from the government in 2006.
About 70,000 people are believed to have fled Mogadishu since May 7, when the armed groups stepped up their attacks on government.
Somalia has spent years without a functioning government following the overthrow of former president Mohamed Siad Barre in 1991, which set off a bloody cycle of violence in which thousands have died.