The battles started in the early morning and continued unabated for several hours.
Mohmoud Dhere, a military spokesman, declined to comment on Wednesday's casualties, but criticised the insurgents for "destabilising the country".
It appeared to be the most sustained fighting in Mogadishu since August 21, when four hours of fighting outside the presidential palace killed 12 people.
Some residents fled their homes to other parts of the capital, carrying their belongings.
Thousands of civilians have been killed since the ICU began its insurgency in December 2006, after its were driven from power in Mogadishu and much of the south.
As fighting continued in the capital, pirates seized a French sailing yacht off Somalia's northern coast.
The French foreign ministry said two French nationals were aboard the yacht that was seized in the Gulf of Aden, where hijackings of vessels have increased in recent months.
The Venezuela-registered Carre d'as - a sixteen-metre leisure boat - was hijacked late on Tuesday, the AFP news agency quoted a source in the French foreign ministry in Paris as saying.
Hassan Alore, the minister for natural resources in Somalia's breakaway Puntland region, said the hijackers had commandeered the boat and were taking it to the village of Eyl, south of Puntland's capital Bossaso.
"The pirates already got seven other ships hijacked off the Somalia coast in Eyl village," Alore added, saying the vessel was currently at Calula village east of Bossaso.
The French foreign ministry said a crisis meeting had been held on Wednesday to begin moves to secure the release of the yacht as quickly as possible.
"France firmly condemns this act of piracy and calls for the immediate release of the people held on board this yacht. Our prime concern is the safety of our compatriots," the ministry said in a statement.
Since the end of July, eight ships have been hijacked in the Gulf of Aden, including two Malaysian vessels as well as others from Germany, Iran and Japan.
The waters off Somalia are the most dangerous in the world for pirate activity, with the International Maritime Bureau reporting 24 attacks in the area between April and June this year.