The blast in Yusufiya, a frequently targeted area just south of the capital, also left at least 17 people wounded, an interior ministry official said.
A medic at the nearby Mahmudiyah hospital said at least four soldiers were among those killed in the blast.
It came just hours after Iraqi forces launched an offensive to retake second city Mosul, in the north of the country, from the Islamic State group.
Observers had warned that IS might seek to attack civilians in Baghdad and elsewhere as Iraqi forces launch their bid to wrest back the jihadists' last major stronghold in the country.
An attack on a funeral tent in Baghdad on Saturday killed at least 36 people. Another two people were killed in a blast in the capital yesterday.