The attack occurred when the car bomb exploded outside the compound of Halwadag district in Mogadishu.
More than 10 people, mostly, young Koranic school students, were also injured in the blast, according to reports.
Al-Shabab armed group immediately claimed the responsibility for the attack, pro-Al-Shabab websites reported.