Insurgents fired mortar rounds at the presidential palace in Mogadishu on Sunday, prompting an artillery duel with government forces.
Large areas of the capital are almost deserted as residents flee but military roadblocks are deterring the remaining civilians from leaving.
At least 80 people are thought to have been killed in the recent fighting.
The UN says 100,000 people have left in the last two weeks to escape clashes between Ethiopian soldiers and Islamist militants.
Mogadishu’s hospitals are packed with wounded and refugees from the fighting, and are reported to be running low on supplies of food and water.
UN Secretary General Ban Ki-moon has warned of a growing humanitarian crisis in Somalia.
“Overall, 1.5m people are in need of humanitarian assistance, a 50% increase since the beginning of the year,” he said on Friday.
Earlier he said a UN force would not be viable and that other options should be considered, including a multi-national force or what he calls a “coalition of the willing”.
The African Union did agree to send 8,000 peacekeepers to Somalia this year but only 1,600 Ugandan troops have actually made it.