At least six civilians have died after shells targeting African Union (AU) peacekeeping bases in Mogadishu went astray, reports said on Monday.
Islamist insurgents launched attacks on two bases in the early hours of Monday, the BBC reported.
No AU troops were reported injured in the attack, but shells landed in residential areas nearby, killing six members of a family and injuring others.
Almost daily battles have blighted the Horn of Africa nation since Ethiopian troops invaded in 2006 to drive out the Islamist regime and put the transitional federal government back in power.
Islamist insurgents have since fought back, taking over the key port town of Kismayo and hammering Ethiopian, government and AU peacekeeping troops.
Two AU peacekeepers from Uganda died last weekend, bringing the total number of AU troops killed to eight.
However, civilians have borne the brunt of the fighting. The Mogadishu-based Elman Peace and Human Rights Organization this week said that 9,474 civilians have died in the insurgency since early 2007.
Meanwhile, police freed a German citizen and his wife who were kidnapped Saturday by gunmen in Puntland, an official said on Monday.
"The Somali police used force, injuring two of the gunmen; the operation was successful," Andrew Mwangura of the East African Seafarers' Assistance Programme told DPA.
"The hostages are safe and in the hands of the rescue group and the wife's clan members," he continued.
Police launched the operation on the gunmen's hideout near the port town of Bosasso in the early hours of Monday morning.