Zynab Al Harbiya was visiting her sick grandfather in Iraq with her family and had begged her mum to take her to buy an ice cream after they had been fasting for Ramadan.
While she was inside the shop, a car bomb went off, killing Zynab and injuring other members of her family.
Another bomb went off an hour later, with ISIS claiming responsibility for both attacks in a statement, according to ABC.
The 12-year-old who was a student at Sirius College had only been in Baghdad for a few days.
Her cousin, Layla Al Saabary, says before leaving Australia Zynab expressed fears for her safety.
"She told my son before she left, she said, 'I am scared of the bombs', and we said, 'It is OK.'"
"All I know is that she was just near the ice-cream parlour and the explosion was close to her so there was no chance," she continued.
Zynab's school posted a photo of her this morning, saying, "Sirius College is deeply shocked and saddened by the tragic loss of our bubbly Year 7 student Zynab Al Harbiya who was tragically taken by the bombing in Iraq."
"Our condolences and prayers are with her family, friends, teachers and the wider school community. Her smiling presence will be missed. Allah Yerhama. Rest in Peace Beautiful Girl xxxx"