The terrorist group al Shabaab claimed responsibility for the attack and said it carried out the attack and "inflicted casualties" without giving details.
Hussein Afrah, a Somali military officer, said those killed were Somali soldiers.
"The car bomb targeted UAE trainers in a bulletproof car. They are all safe," captain Afrah told Reuters.
"The incident took place near the military hospital where UAE trains Somali military. Three Somali military who were on the military pick up died and several other civilians who were passing by were injured," he added.