Suspected Al-Qaeda-linked Islamists attacked the Somali intelligence headquarters in the capital Mogadishu on Sunday. At least 12 people were killed including seven of the al-Shehab attackers, according to the authorities.
The apparent target of the dawn raid was the Godka Jilow, a jail housed at the intelligence headquarters.
Scores of al-Shebab fighters are known to be held there.
Mohamed Osman, a police officer, told RFI that the attackers used a car laden with explosives to blast open the gate, then a gunbattle ensued with the prison guards.
Gunfire could be heard for over an hour, during which time several of the attackers detonated explosive belts, blowing themselves up and adding to the carnage.
No prisoners were freed during the assault.
Interior ministry spokesperson Mohamed Yusuf told RFI that all the attackers were killed.
Yusuf also told reporters at a later press conference that the attackers had failed to disrupt Operation Indian Ocean that is currently being carried out by African Union and Somali government troops in the south of the country against Shebab.
Shebab's spokesman, Abdulaziz Abu Musab, told a local radio station that 15 government soldiers were killed during the raid.