At least six people were killed, including two children, after a suicide bomber detonated an explosives-laden vehicle outside a district headquarters in Somalia's capital, authorities said Sunday.

Police captail Mohamed Hussein said the bomber tried to speed through a checkpoint but was stopped by security forces, prompting him to detonate the vehicle near the gate of Howlwadag district headquarters.

The three soldiers who stopped the truck were killed instantly and the three others killed were civilians, said the Mogadishu mayor's spokesman, Salah Hassan Omar.

Fourteen people need intensive care, including six children, said the Aamin Ambulance service.

Among the wounded was deputy district commissioner Ibrah Hassan Matan, and any victims were students at a nearby Islamic school.

Officials warned there could be more casualties as the blast brought down nearby buildings including a mosque.