The Islamic State group claimed responsibility for a bombing on Saturday east of Baghdad, according to a statement posted on an IS-affiliated website.
The attack killed at least 21 people and wounded at least 42 others, according to Iraqi police and hospital officials.
The IS statement described the attack as a three-ton lorry bombing.
The attack targeted Shiite civilians shopping in an open-air market selling fruit, vegetables and meat in Nahrawan, according to Iraq's Interior Ministry.
The IS statement and initial reports from local officials at the scene claimed the bombing targeted Shiite pilgrims walking to Baghdad's holy Kadhimiyah shrine.
"It was not a road for people walking toward Kadhimiyah," said Brigadier General Saad Mann, a spokesman for the Interior Ministry and Baghdad Operations Command.
The attack's casualty figures were confirmed by police and hospital officials who 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 travel on foot to the shrine of eighth-century Imam Moussa al-Kadhim over the coming days to commemorate the anniversary of his death. Security in the capital has been tightened in anticipation of the crowds; additional checkpoints have been set up and roads have been closed.
The Islamic State group regularly carries out attacks targeting Iraq's Shiite majority, including attacks on Shiite pilgrims and civilians in Baghdad's Shiite neighborhoods. IS views Shiites as apostates deserving of death.
Brig Gen Mann said the attack in Baghdad was carried out by IS in response to recent territorial losses in Iraq.
"The only strategic weapon left for them are (suicide bombers)," Brig Gen Mann said. While IS still controls large swathes of Iraq's west and north, the group has suffered a series of territorial losses over the past year. Most recently IS fighters were pushed out of the western town of Hit.
In the face of those losses, analysts and Iraqi security officials say the extremist group is increasingly turning to insurgent-style attacks in Baghdad and other areas far from the frontline fighting.
More than 40 civilians have been killed in high-profile bombings in Baghdad over the past month. On March 25th an IS-claimed suicide bombing attack on a stadium killed 29 and wounded 60.
Saturday's attack also comes amid a political crisis in Iraq as the country's prime minister Haider al-Abadi is under increasing public pressure after repeated failed attempts at political reform to combat corruption and waste.