Witnesses said that five children were among those killed in last night's clashes.
They were apparently killed in crossfire as the Somali government battled fighters in the city centre.
Fleeing in panic
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.
Somlia is anxiously awaiting the deployment of an 8,000-strong African Union 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.