In the latest bombing claimed by al Shabaab, an Islamist group which is fighting to establish its own rule in Somalia, based on a strict interpretation of sharia law, a huge explosion shook central Mogadishu and a large plume of smoke rose above a building housing Somalia's ministries of labour and works.
Police later said the fighting at the building had ended and that the premises had been completely secured.
"The building was secured by security forces. The four militants who attacked the building were shot dead. Another militant was a suicide car bomber and so he also died," Major Ali Abdullahi, a police officer told Reuters.
Abdullahi said ten people, including assistant labour minister Saqar Ibrahim Abdala and police personnel, had died.
Police said earlier that some 20 people had been injured in the assault, which began when a suicide bomber detonated a car bomb, allowing other militants to storm the building.
Dr. Abdikadir Abdirahman, director of Amin Ambulance Service told Reuters soon after the assault began that people were trapped inside the building and that it was not possible to rescue them because of heavy exchange of fire.
Al Shabaab told Reuters one of its fighters had rammed the ministry building with a car bomb allowing others to enter.
"We are inside the building and (the) fighting goes on. We shall give details later," Abdiasis Abu Musab, Al Shabaab's military operation spokesman said during the attack.
Al Shabaab, which is trying to topple Somalia's Western-backed central government, was ejected from Mogadishu in 2011 and has since been driven from most of its other strongholds.
But it remains a threat, with its fighters frequently carrying out bombings in Somalia and neighbouring Kenya, whose troops form part of the African Union mandated peacekeeping force AMISOM that helps defend Somalia's central government.
Major Ali Abdullahi said ten people, including assistant labour minister Saqar Ibrahim Abdala and police personnel, had died.