
The blast in the Karrada area, where many people go to shop ahead of the holiday marking the end of the holy Muslim fasting month of Ramadan, also wounded at least 20 people, the officials said.
Interior ministry spokesman Saad Maan said the killer had planted a car bomb near a restaurant.
The Islamic State group claimed one of its suicide bombers had launched the attack targeting a gathering of Shiites, giving a far higher toll of 40 dead and 80 wounded, according to the SITE monitoring group.
The jihadists overran large areas north and west of Baghdad in 2014, but have since lost significant ground to Iraqi forces, most recently in Fallujah, a city west of Baghdad that was recaptured a week ago.