The Islamic State jihadist group has claimed an attack at a Shiite mosque south of the Iraqi capital that officials said killed at least six people.

IS, in a statement, said a suicide bomber named as Abu Hussein al-Ansari carried out the attack inside the mosque, while security and medical officials said it took place nearby after Friday prayers, also wounding at least 19 people.

The IS only mentioned the suicide bombing, but officials said it was preceded by a roadside bomb, and that the attack took place after security forces arrived at the scene.

IS frequently carries out attacks against civilians from Iraq's Shiite Muslim majority, whom it considers to be heretics.

The Friday attack came a week after a series of bombings claimed by IS targeted Shiites in Baghdad, killing at least 19 people.

IS overran large areas north and west of Baghdad in June 2014, sweeping security forces aside, and though Iraqi forces have since pushed the jihadists back, the group still holds much of western Iraq.

Bombings in Baghdad have become less frequent since the IS offensive last year, apparently because the jihadists have been occupied with fighting elsewhere.