Militant group al-Shabab has bombed Somalia's intelligence headquarters in the capital, Mogadishu. The rebels were trying to reach a high-security prison within the facility.
The militants carried out a bomb and gun attack against the facility in central Mogadishu on Sunday. The complex is a key interrogation center for Somalia's intelligence agency, and contains a high security prison. Many suspected militants are believed to be held there, along with political prisoners.
The attack took place at about midday, when a car bomb exploded outside the Godka Jilacow facility. At least three further explosions and a gun battle took place afterwards.
Al-Shabab has confirmed its militants were behind the assault.
"The target of the attack was to release scores of innocent Muslims, including members of our group, who are under investigation and tortured by Somali national security members," said senior al-Shabab member Abu Abdalla.
The death toll is unclear, but could be up to 15, which includes a number of the militants as well as the security officials fighting them.
Security official Mohamed Hassan told the dpa news agency that the situation had been brought under control.
"We have killed a number of militants, and we are still counting the death toll. Our security forces finally overpowered the attackers who were well-armed," Hassan said.
The attack came a day after Somalia's army and African Union forces captured the al-Shabab stronghold of Bulomarer, as part of an offensive aimed at retaking key ports and cutting off a key source of revenue from the Islamist fighters.
Al-Shabab, which is linked to al Qaeda, wants to establish an Islamic state in Somalia and topple the internationally-backed government. The group has killed dozens of government officials this year, including popular MP and singer Saado Ali Warsame, who was assassinated in July.