There was no immediate claim of responsibility for the attack, but al-Shabab fighters linked to al-Qaeda and Hizbul Islam forces have stepped up their campaign to topple the government of Sharif Ahmed, the Somali president, in recent weeks.
Earlier, mortar rounds were fired at the presidential palace and African Union (AU) peacekeepers.
At least 53 people are believed to have died in the violence since Friday morning, when Somali forces launched attacks on several areas of Mogadishu which are controlled by the opposition forces.
During a lull in the fighting on Saturday at least 8,000 people joined tens of thousands of others that have fled the city.
"Unfortunately, due to heavy fighting on Friday 22nd, the number of displaced from Mogadishu sharply increased," the office of the UN High Commissioner for Refugees (UNHCR) said.
"An estimated 8,000 were displaced on Friday only, bringing the total number to 57,000," it said in a statement.
People continued to leave Mogadishu on Sunday, walking out of the city with whatever they could carry.
"I call on the international community and the aid agencies to react very urgently to the worsening humanitarian situation in Somalia," Mohamud Abdi Ibrahim, Somalia's minister for humanitarian affairs, said.
'Held to ransom'
Barigye Bahoku, the AU peacekeeping force spokesman in Mogadishu, told Al Jazeera that despite the heavy fighting there was little his forces could do to protect civilians.
"What can we do? We are doing what we were mandated to do. We cannot adjust our mandate or operate outside it," he said.
|Fighters from -Shabab and Hizbul Islam groups have vowed to topple the government [AFP]
"We feel frustrated; we feel anger that the whole of this world is being held at ransom by about 2,000 armed people beginning with their own nationals - the Somalis - and ... the impact is felt by the rest of the world, including you and me."
The AU, which has some 4,300 peacekeepers from Burundi and Uganda in Mogadishu, is protecting key sites but its mandate limits the force to defending itself when attacked.
But Mohamed Abdi Gandi, Somalia's defence minister, struck an optimistic note and insisted that government troops would defeat anti-government fighters.
"It was our plan to make peace in our country and restore law and order," Gandi said.
"Our security forces, with the help of our people in the operation, have reached their target and are in defensive positions."
Meanwhile, the AU has called for a no fly-zone over Somalia and a sea blockade off its coast to stem the flow of weapons from Eritrea.
Eritrea, which denies supporting the armed opposition, has recalled its AU ambassador in response.
Somalia's neighbours and Western governments fear the Horn of Africa nation, mired in civil war for 18 years, could become a haven for Islamist fighters unless the new government can defeat them.