At least 12 people were killed and 32 wounded when a suicide bomber wearing a vest packed with explosives attacked a mosque in Abu Ghraib, about 15 miles west of Baghdad, Iraqi officials said.
There was no immediate claim of responsibility for the blast on June 27, the first in or around Baghdad since the government declared victory over Islamic State militants in Fallujah, further west, which was seen as a launchpad for such attacks.
On June 26, Iraqi forces declared Fallujah fully liberated from IS.
Worshippers were gathered at the mosque, in a predominantly Sunni Muslim area, for prayers after breaking their fast during the holy month of Ramadan. IS has called on supporters to step up attacks during Ramadan.
In one respect, the attack was not characteristic of IS, however, which generally hits Shi'ite targets in Iraq.