"Somalia's prison forces concluded an operation in which prisoners fought inside the cell. Prisoners who tried to fight were shot dead," Somalia National TV said in a post on their Facebook account.
It said the inmates who died were members of the Islamist group al Shabaab who had been sentenced to death.
Two security personnel at the prison, who asked not to be named for fear of retribution, told Reuters grenades and guns had been smuggled into the cell and the inmates had used them to start the firefight.
"We heard gunfire and...explosion inside the cell. The gunfire stopped after like 15 minutes. Government forces cordoned (off) the whole area," said Abdullahi Aden, a local resident who lives near the prison.
Al Shabaab has been fighting Somalia's central government for nearly two decades and wants to establish its own rule based on its strict interpretation of Islamic sharia law.
Published 13 July 2024, 14:43 IST