The death of an Australian girl in a Baghdad bombing underscored why Australia was fighting Islamic State militants in the Middle East, the Australian foreign minister said Wednesday.

Zynab Al-Harbiya, 12, from Melbourne, went with her family to Baghdad to visit her sick grandfather when she was killed early Tuesday local time when a car bomb exploded outside a popular ice cream shop, Foreign Minister Julie Bishop said.

More than 30 others were killed, Australian official Frances Adamson said. Dozens more were injured, including Al-Harbiya's mother and an uncle, according to lawmaker Bill Shorten.

The Islamic State group claimed responsibility for the attack, which Iraqi officials said involved apparently remotely detonated explosives inside a parked car.

"This tragedy underscores the brutality of this terrorist organization. It shows no respect for religion, nationality, sovereignty, borders, no respect for humanity," Bishop told reporters.

She said it shows why the Australian government has continued to commit defense personnel to support the Iraqi security forces "so that they can fight to defeat this terrorist organization within Iraq and to prevent its spread to other parts of the world including in our region."

The girl's cousin, Layla Al-Saabary, said the family had only been in Baghdad for a few days when the tragedy occurred and Zynab had been "scared of the bombs."

"She wanted to go and buy ice cream, so she insisted. Her mother gave permission and so they went to the main square and she was going to go buy ice cream and she went and she never came back," Al-Saabary told Australian Broadcasting Corp.

Shorten told Parliament that Zynab, the Australian-born daughter of Iraqi refugees, had gone with her mother and an uncle to Baghdad while her father stayed in Melbourne. He said the mother's wounds were not life threatening but the girl's uncle was hurt seriously.

Prime Minister Malcolm Turnbull described Zynab as "another innocent killed by this violent tendency, this violent terrorist movement that is gnawing away, seeking to destroy and pervert and blaspheme one of the great regions of the world."

Australia is one of the biggest contributors to the U.S.-led military campaign against IS militants in Iraq and Syria, with 780 Australian military personnel in the Middle East and aircraft including six jet fighters striking Islamic State targets.

The holy Muslim month of Ramadan is often marked by an increase in violence in Iraq.

Last year, a huge truck bombing claimed by IS killed hundreds in a retail district in central Baghdad where people were shopping for clothes ahead of the holiday that marks the end of Ramadan. It was the single deadliest event in Baghdad since Iraqi leader Saddam Hussein was toppled in 2003.