There was no immediate claim of responsibility.
A police officer at the scene, Abidkadir Mohamed, told the Reuters News Agency it was a remotely controlled bomb along the road that exploded.
According to officials, the blast has completely destroyed the bus leaving all of its passengers dead on the spot.
Deputy Chairman of Afgoye, Abdullahi Hassan, who went to the scene, said “we have a big tragedy here,” he told VOA. “Everyone is dead, you only see pieces of dead bodies, hands, legs.”
The explosion comes less than a week after an attack on a hotel by the al-Shabab armed group in Mogadishu killed at least 15 people.