Many of those killed and injured are believed to be civilians
Mogadishu's mayor has told residents to leave the Somali capital's war zones, amid fierce battles with insurgents.
At least 50 people have been killed in three days of Islamist insurgent attacks, witnesses and officials say.
Mayor Abdurisaq Mohamed Nor said the long-anticipated government offensive may start soon, so residents should withdraw at least 2km (1.25 miles).
About half of Mogadishu's residents have already fled the city after two decades of conflict.
The BBC's Mohamed Olad Hassan in Mogadishu says this is the heaviest fighting since May 2009, when insurgents tried to topple the weak UN-backed government.
He says those still in the city have not yet responded to the mayor's call.
"We urge the civilians to flee from the battle zones and go at least 2km away to avoid being hit," Mr Nor said.
The United Nations Refugee Agency estimates that some 33,000 people have been driven from their homes in Mogadishu over the past six weeks.
Our reporter says government forces are shelling insurgent front lines, to stop them advancing towards the few areas under control of government forces, who are backed by African Union peacekeepers.
"Some 200 insurgents aboard 12 vehicles mounted with machine guns came to our district and started to move towards the presidential palace," said Mohamed Abdi Haji, a resident of Mogadishu's northern Wardhigley area.
"Government soldiers and AU peacekeepers bombed them with heavy artillery and forced them to retreat," he said.
Some of those fleeing the city told the BBC that many of their relatives and neighbours are trapped in the war zone.
"My husband and six of my relatives and some of my neighbours are trapped inside their homes in north Mogadishu's Abdulasiz district by landing mortars and bullets flying everywhere," said Dahabo Duhulow, a mother of six.
Government forces only control a small part of Mogadishu
With his two-year-old son clasped to his chest, Adow Yusuf Da'ud said he had walked three hours through dangerous streets and alleyways to escape the fighting.
"During the day and during the night, the shells were raining down into our residences," Mr Da'ud said.
"My oldest son is still there to take care of the house and the property."
The UNHCR said it was especially worried about the thousands of people who are unable to flee the capital.
There are almost 1.5 million people now displaced within the country.
For months now government leaders and its military commanders have been talking about an impending operation to seize control of the whole of Mogadishu.
Our reporter says there are few civilians left in areas which often see battles but large numbers remain in some districts controlled by the insurgents.