Local police officials at the scene said the attack targeted Shiite pilgrims walking to Baghdad's holy Kadhimiyah shrine, but other Iraqi security officials say the attack targeted an open-air market. The two accounts could not be immediately reconciled.
The officials spoke on condition of anonymity as they were not authorized to speak to the press.
Thousands of Shiite pilgrims from across Iraq are expected to descend on the shrine on foot over the coming days.
There was no immediate claim of responsibility for the attack, but the Islamic State group has claimed responsibility for similar attacks targeting Shiite pilgrims and civilians in Baghdad's Shiite neighborhoods.