Somalian government forces are begining to respond to an attack on a house in the northern Mogadishu district of Abdiasiz, which killed 10 civilians.
The attack has been claimed by Al-Shabaab, a jihadist group linked to Al-Qaeda.
The raid took place around 1200 GMT in the northern district of Abdiaziz, the government said, adding that three civilians had been wounded.
"The security forces rescued and extracted many other civilians from that house and other nearby buildings during the attack," it said.
The attack was claimed by the Al-Shabaab, which is linked to Al-Qaeda.
A soldier named Mohamed Ali, who was present at the scene, said the attackers "stormed the building after blasting the main gate with explosives".
He said they "resorted to attacking the houses occupied by civilians after they are being defeated in the frontlines".
In recent months, the Somali army and local clan militias have retaken chunks of territory from the militants in an operation backed by US air strikes and an African Union force known as ATMIS.
But Al-Shabaab, which has been fighting the government since 2007, still control parts of the countryside from where they have carried out numerous retaliatory attacks both in Somalia and in neighbouring countries.
The jihadists, who were forced out of the capital by African Union troops in 2011, have frequently retaliated against the latest offensive with bloody strikes.
In the deadliest Al-Shabaab attack since the offensive was launched last year, 121 people were killed in two car bomb explosions at the education ministry in Mogadishu in October.