Police said the grenade was thrown from an auto rickshaw along Tarabunka, a busy junction in the capital Mogadishu.
"I can confirm that five people have been injured. Two of them are soldiers. Unidentified people hurled a grenade from a Bajaj (auto rickshaw) and sped off," Hodan district police commissioner Abdifitah Bashir said.
Witnesses confirmed the police report noting the auto rickshaw sped off with the attackers.
"Some people in the Bajaj threw grenade and disappeared. A number of people have been injured," Sadaq Yusuf, an eye witness, told Xinhua.