Police officers stopped the car in the busy K4 junction of the capital.
Police have confirmed the deaths of an officer, a civilian and the driver, who had allegedly set off the explosives.
Islamist militant group al-Shabab, which has links to al-Qaeda, has staged several suicide attacks in Mogadishu as it battles the UN-backed government.
Meanwhile, Kenya says more than 40 al-Shabab fighters and 11 Somali soldiers were killed in a battle in the southern town of Hawo, near Afmadow, at the weekend.
There is no independent confirmation of the Kenyan claims.
Kenya has sent troops into Somalia to tackle al-Shabab, after accusing the militants of a spate of kidnappings - charges it denies. more