A 12-year-old Australian girl was buying ice cream when she was killed in a bomb blast.

A 12-year-old schoolgirl from Victoria has been killed in a terrorist attack while visiting an ice cream shop in Baghdad.

Zaynb Al-Harbeya, from Thomastown in Melbourne, was visiting the Iraqi capital city with her parents to spend time with her sick grandfather, and was getting ice cream with her uncles in the bustling Karrada neighbourhood when she was killed in a car bomb explosion on Tuesday, Nine News reports.

A cousin of Al-Harbeya, who was in Year 7, has described her as “a loving and fun 12-year-old girl.”

Detonated during peak hour, international reports are claiming the bombing has claimed a total of 31 lives, while local police and health officials are currently claiming 17 people have been killed and 32 wounded.

australian girl killed in baghdad
Zaynb Al-Harbeya. Source: Nine News.

A closed-circuit camera captured the moment of the blast, the video showing a busy downtown avenue with cars driving down the street when it detonates. A huge fireball then engulfs a building, forcing the cars to scramble to get away.

Other videos of the attack posted on social media show wounded and bloodied people crying for help on the footpath outside the ice cream parlour.

A second attack also went off during peak hour, with an explosives-laden car exploding near the state-run Public Pension Office in Baghdad's busy Shawaka area, killing 14 and injuring at least 37, a police officer said.

Islamic State has claimed responsibility for the bombing.

The attacks came just days into the holy month of Ramadan when Muslims fast during daylight hours.

After sundown, families break their fast and Baghdad's restaurants and cafes quickly fill up with people staying up long into the night.

During Ramadan last year, another section of Karrada was hit by massive suicide bombing that killed almost 300 people, the deadliest single attack in the Iraqi capital in 13 years of war. The attack was also claimed by IS.

australian girl killed in baghdad
Aerial footage of the bomb explosion. Source: Nine News.

The attacks come as IS militants are steadily losing more territory to US-backed Iraqi forces in the battle for Mosul, the country's second-largest city. The Sunni extremists are increasingly turning to insurgency-style terror attacks to detract from their losses.

The Associated Press could not verify the authenticity of the statements but they were posted on a militant website commonly used by extremists.