Somalia's al-Shabab, the armed anti-government group, has attacked the presidential palace in Mogadishu, leaving at least 14 civilians dead, officials and witnesses say.
Government forces backed by African Union troops retaliated on Saturday against the fighters, whose attack came as Sharif Sheikh Ahmed, the Somali president, was attending a conference in Turkey.
Al-Shabab, which has been fighting to topple Somalia's government, launched its main attack on the northern Shibis and Bondhere neighbourhoods of the seaside capital late on Saturday.
After a brief lull, the battle resumed at dawn on Sunday.
"The number of civilians killed during the clashes overnight has reached 11 and it could be higher, because the violent militants using mortars attacked several other positions in southern Mogadishu this morning," Mohamed Ali Idle, a Somali government security official, told the AFP news agency.
The victims included five members of the same family who were killed when a mortar shell struck their home, several witnesses told AFP.
"The fighting was very heavy here in Bondhere and Shibis. Many people died and I saw five family members who were killed when a mortar round struck their house. Several others were also injured," Abdirahman Ise, a local resident, said.
"I'm also hearing that several other civilians were killed in the crossfire in the neighbourhood. Unfortunately the fighting continued and there was no transport to collect the wounded overnight."
At least three other civilians were killed and 25 wounded as a result of an exchange of mortar fire in the southern neighbourhoods of Holwadag and Black Sea, Ali Muse, head of Mogadishu's ambulance services, told AFP.
Al-Shabab's offensive began when its units moved down from their stronghold towards Kilometre Zero, a strategic crossroads leading towards the port and the presidential compound, according to witnesses and officials.
Major Ba-Hoku Barigye, a spokesman for the African Union Mission in Somalia (Amisom), said al-Shabab's progress required immediate action.
"People need to understand what our mandate is; We are here to protect the transitional federal institutions of Somalia and we also have red lines. If our forces are endangered, they have the right to protect themselves," he said.
Hundreds of civilians have died this year as a result of both al-Shabab attacks and retaliatory fire by Amisom or government forces.
Thousands have been killed in such incidents over the past three years and hundreds of thousands have been forced out of the city into crowded camps.
Al-Shabab controls most of southern and central Somalia, but it has failed to reach the well-protected presidential compound and topple Ahmed.
The US state department says al-Shabab has links to al-Qaeda.
Sheikh Ali Mohamoud Rage, the group's senior spokesman, claimed on Sunday that its fighters had killed dozens of government forces.
"Our fighters attacked several positions controlled by the apostate government soldiers. We killed dozens of them and took control of their barracks overnight," he said.
Ahmed was elected in January 2009 but has since failed to assert his authority and to prevent the expansion of al-Shabab.
He is also facing dissent within his own government.
He is currently in Istanbul for an international conference aimed at bolstering support for his transitional institutions and drafting a road map to peace.
On the opening day of the conference on Saturday, Ban Ki-moon, the UN secretary-general, told delegates from 55 nations and 12 international organisations that "the only way to restore stability is to support this government in its reconciliation effort and its fight against extremism."
"If the international community acts now, I think it can make the difference," he said.
Somalia has had no effective government for 19 years and Western nations and neighbours say the country is used as a shelter by fighters planning attacks in East Africa and further afield.