Iraq buried the victims, among them many young boys, of a suicide attack that ripped through a trophy ceremony after a local football tournament, killing 32 people.

The attacker, who himself looks like a teenager on a photo distributed by the Islamic State group that claimed the attack, walked into crowd gathered after the game and blew himself up.

"There are 32 dead and also 84 wounded, 12 of whom are in a critical condition," an official in Babil province health directorate said.

"Seventeen of those killed are boys aged between 10 and 16," the official said.

The attack took place in the village of Al-Asriya, which lies near Iskandariyah, a town about 40km (25 miles) south of the capital.

The bomber detonated his suicide vest late afternoon on Friday as local officials were handing trophies to the players after the tournament.

A video posted on social media shows a local official speaking in front of a table covered with trophies and calling out the name of a player before a huge blast.

The footage cuts off with a big flash of yellow light.

"The suicide bomber cut through the crowd to approach the centre of the gathering and blew himself up as the mayor was presenting awards to the players," Ali Nashmi, an 18-year-old eyewitness said.

The mayor, Ahmed Shaker, was among the dead, as was one of his bodyguards and at least five members of the security forces.

Pictures posted on social media of the blast site showed mangled goal posts smeared with blood.

The US state department extended its condolences to the bereaved in a statement, as did United Nations chief Ban Ki-moon, who was visiting Iraq for talks.

"I would like to take this opportunity to express my deepest condolences to the people and government of Iraq, and particularly those members of the families affected by terrorist attacks yesterday," he told reporters.

The Asian Football Confederation (AFC) also released a statement condemning the bombing.

"Football is a powerful force for good and our game has a long history of bringing people together even during conflicts around the world," it said.

"Using football and sport stadiums as a stage for these heinous acts of violence is a cowardly, completely unjust and indiscriminate act," the AFC said.

IS has been losing territory steadily in Iraq for almost a year.

In the most recent operations, Iraqi forces have been gaining ground in the western province of Anbar and have just begun their reconquest of the province of Nineveh.

Observers have warned that, as their self-proclaimed "caliphate" shrinks towards extinction, IS fighters are likely to revert to their old guerrilla tactics and ramp up suicide attacks on civilian targets.