At least three people were killed and six others wounded when a mortar crashed into a concrete building sheltering about 20 people in Tawfiq in southern Mogadishu, witnesses said.
An AFP correspondent reported heavy shelling around the fortified presidential palace, guarded by Ethiopian troops and AU peacekeepers, and in Fagah, northern Mogadishu.
Mutilated bodies lay rotting in the streets in northern suburbs on Tuesday, with fighting blocking access for aid workers.
Yusuf al-Azhari, a Somali political adviser, told Al Jazeera that the government evicted what he called "terrorist groups" from one of the two districts in Mogadishu.
"Mogadishu is divided into 16 districts. Two of the districts were occupied by the so-called union courts terrorists, who are supported by al-Qaeda and terrorist groups around the world.
"The government is now fighting the group to evict them from those two districts. The government forces have already succeeded in evicting them from one place."
Al-Azhari defended the presence of Ethiopian forces in Somalia, saying there are there at the invitation of the Somali government.
Ibrahim Addou, secretary of foreign affairs at the Islamic Courts Union, said the group had no relations with al-Qaeda.
"These accusations are cheap terms used for fund-raising purposes by Ethiopia. Somalia is under the Ethiopian occupation, which is being resisted by the Somali people."
At least 256 people have died and hundreds have been wounded since the latest peak in fighting began last week, according to the Elman Peace and Human Rights Organisation, which monitors casualty rates.
Hospitals have been overwhelmed, with doctors appealing for extra medical supplies.
The UN refugee agency said last week that more than 321,000 people had fled the seaside capital since February 1, but elders told AFP that the figure could now be closer to 400,000 with the exodus of thousands more over the past six days.
Ban Ki-moon, the UN secretary-general, on Monday urged an end to the battles between fighters of the Union of Islamic Courts, some of whom are allegedly linked to al-Qaeda, and the Somali government-allied Ethiopian troops.