A suicide bomber detonated a vest midday Friday inside the prison, authorities said, saying that General Osman survived the attack and was rushed out of the prison. VOA Somali later contacted Osman, who said he did not want to comment on the attack.

Witnesses say a man ran after the commander when he stepped out of his car on his way to a mosque inside the prison.

A security guard intercepted the suspect, forcing the attacker to detonate a suicide vest, killing the soldier and wounding three others, according to security sources.

Security sources say three people were arrested.

It’s unclear how the bomber managed to pass through security checks to make his way to a mosque inside Mogadishu’s biggest central prison.

The mosque also is used by officials from Somalia’s military tribunal, which tries Al-Shabab suspects.