A suicide bomber targeted Shia worshippers at a Baghdad mosque after Friday prayers, killing at least six people, security and medical officials said.
The attack in southwest Baghdad also wounded at least 25 people, the officials said.
There was no immediate claim of responsibility for the attack, but the Islamic State jihadist group carries out frequent suicide bombings targeting Shiites, whom it considers heretics.
IS overran swathes of territory north and west of Baghdad in 2014, but Iraqi forces backed by US-led strikes have since regained significant ground.
The jihadists still control a large part of the country’s west, and are able to carry out frequent bombings in government-held areas.