Thousands have fled the battles as civilians are caught in the crossfire
Twelve civilians have died in the Somali capital as government soldiers retaliated to mortars fired at the presidential palace by insurgents.
"Most of the shells landed on deserted houses but three hit places where people stay," a witness told the BBC.
Since May more than 165,000 people have fled Mogadishu as militant Islamists hardliners battle government forces.
Meanwhile, the prime minister says he was assured at the African Union summit that more peacekeepers will be sent.
The African Union has a 4,300-strong force in Mogadishu, but its mandate prevents peacekeepers from attacking the insurgents except for in self-defence.
"We welcome the support of the recent AU heads of states summit in Libya for the government... and we have a firm pledge for the increase of the AU peacekeepers," Prime Minister Omar Abdirashid Ali Sharmarke told journalists in Mogadishu on Sunday.
Their mandate would be changed to allow them to "fight along government soldiers", he said, without giving further details.
A government military officer told the BBC that at least six mortars landed around the presidential palace, where the AU has a base.
Presidential guards then retaliated, shelling a northern residential area.
President Sheikh Sharif Sheikh Ahmed, a moderate Islamist, took office in January but even his introduction of Sharia law to the Muslim country has not appeased the hardliners.
The radical al-Shabab Islamists, accused of links to al-Qaeda, and another insurgent group want to unseat him.
Somalia's police commander has warned that his country's chaotic security situation was getting even worse because of an influx of foreign fighters.
General Abdi Hassan Qaybdid said thousands of foreigners were arriving in Somalia by land, sea and air, to help the Islamists.
"There was at time when foreigners were only involved in training and technical support and financial matters," he told BBC Somali on Sunday.
"But now, there are fighting units of foreign men and the Somalis role is limited to reconnaissance, advice and local knowledge."