Witnesses said that five children were among those killed in Saturday's clashes.
They were apparently killed in crossfire as the Somali government battled fighters in the city centre.
Fleeing in panic
Mohammad Adow, Al Jazeera's correspondent in Somalia, said: "The heavy fighting has taken its toll on the residents of Mogadishu. Houses demolished, livelihoods destroyed and even the livestock has not been spared in the ensuing battle.
"As the violence continues, the government is urging people to form vigilante groups to take on its enemies. Some are heeding these calls."
Adan Dirir Bare, a resident of southern Mogadishu, said: "I was very scared yesterday after I heard the heaviest explosion ever in the capital.
"I had insisted a lot on staying in Mogadishu but not now."
"The favour of Western countries is vital to Somalia's future"
Angus Hogg, Horsham, UK
Send us your views
In an atmosphere of panic, some residents scrambled into passenger vans while others just grabbed household items and left on foot for the relative calm of the surrounding countryside.
A mother of five, Sahro Ali Mohamed, said houses in her Mogadishu district were deserted.
"People cannot endure the heavy artillery and mortar exchange that kills people every time," she said as she left with her family.
This week has seen some of the heaviest fighting in the capital since late December when the Union of Islamic Courts movement was driven out by the interim Somali government and its Ethiopian allies.
Somalia is anxiously awaiting the deployment of an 8,000-strong African Union, AU, force to try to help the transitional government restore order in Mogadishu.
The deployment was approved last Tuesday by the UN Security Council.
But the AU has so far managed to raise only half of the required peacekeepers, with possible troop pledges from Nigeria, Burundi, Malawi and Ghana as well as Uganda, which has offered 1,500 troops.