The self-styled Islamic State group has claimed responsibility for a suicide bombing at a football match near the Iraqi capital, killing 32 people.

The bomber detonated his suicide vest as local officials were handing trophies to the players after a local tournament in the village of Al-Asriya, south of Baghdad.

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

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

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," said Ali Nashmi, an 18-year-old eyewitness. 

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 United States state department extended its condolences to the bereaved in a statement, as did the United Nations special envoy to Iraq.

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.

UN chief Ban Ki-moon in Baghdad for talks

United Nations Secretary General Ban Ki-moon has arrived in Baghdad for talks with senior officials on ways of assisting war-ravaged Iraq, the world body said.

Mr Ban, who had last visited the Iraqi capital in March 2015, was travelling with World Bank chief Jim Yong Kim and Islamic Development Bank head Ahmad al-Madani.

They went straight into talks with Foreign Minister Ibrahim al-Jaafari.

Mr Ban flew from Lebanon, where he called for an end to war in the region and visited some of the 1.2 million refugees the country hosts.

A drop in oil prices has had a devastating effect on the economy of Iraq, already strained by the cost of the fight against the Islamic State group.

As areas are gradually retaken from the jihadists in intense battles, Baghdad is left with little to spare on the reconstruction of ravaged cities.

The government has asked for support from its foreign partners.