Mohamed Hussein said that the bomber who infiltrated Gen. Kahiye Police Academy on Thursday targeted police officers during their regular morning exercises.
The assault is the latest in a decade-old battle by the jihadists to overthrow Somalia's internationally-backed government.
The bomber, disguised as a policeman, blew himself up at the General Kaahiye Police Academy.
But the state-run Somali National News Agency says the man was wearing a track suit and emerged from residential areas near the academy before detonating his explosive vest.
Aamin Ambulance Director Abdukadir Abdirahman told Xinhua they had ferried 13 bodies to the city's Medina Hospital.
U.S. willing to begin direct talks with North Korea without preconditions: Tillerson
Russian officials have moreover repeatedly refuted allegations of meddling in the United States election and characterized them as groundless and absurd.
Officers said the toll could have been far worse had the attacker detonated his bomb in the centre of the crowd. Only a few attacks since 9/11 have killed more people.
The Somalia-based Al-Shabab extremist group quickly claimed responsibility for the attack. Al-Shabaab carries out frequent bombings in Mogadishu and other towns.
A drone strike earlier this week against an Al-Shabab vehicle carrying explosives prevented an "imminent threat to the people of Mogadishu", the U.S. African Command said.
An operation against a Shabaab camp on 21 November killed more than 100 fighters, according to the US Africa Command.
But the force is due to be trimmed back as part of a long-term plan to transfer security to the Somali army.