At least 118 inmates escaped from prison after heavy rain damaged the facility
The convoy was carrying senior police official Farhan Qarole, who survived the attack, the government news agency reported.
There was no immediate claim of responsibility for the attack, but al-Shabaab, which wants to overthrow the government and impose its strict interpretation of Islamic sharia law, frequently carries out such bombings.
"I have seen eight dead bodies at the scene including a woman," Hassan Sayid Ali, a driver of a three-wheeled motorised vehicle taxi told Reuters at the scene of the blast at Banadir junction in Mogadishu.