Major Hassan Ali, an Interior Ministry official, said the attack took place when a bomber, wearing an explosive belt, detonated himself among many mourners at the funeral tent in Taji area, located some 20 kilometers north of Baghdad.
Ali added that eight people were killed and 31 others injured in the bombing.
Iraqi security forces sealed off the scene after the explosion as ambulances and civilian cars evacuated the fatalities and wounded people to several nearby hospitals and medical centers, he said.
There was no immediate claim of responsibility for Wednesday's deadly attack, but such assaults bear the hallmarks of those carried out by remnants of the Takfiri Daesh terrorist group.
On December 9, 2017, Iraq’s Prime Minister Haider al-Abadi declared the end of military operations against the Daesh terrorist group in the Arab country.
“Our forces are in complete control of the Iraqi-Syrian border and I therefore announce the end of the war against Daesh,” Abadi told a conference in Baghdad then.
On July 10, Abadi formally declared victory over Daesh extremists in Mosul, which served as the terrorists’ main urban stronghold in the conflict-ridden Arab country.
In the run-up to Mosul's liberation, Iraqi army soldiers and volunteer Hashd al-Sha’abi fighters had made sweeping gains against Daesh.
The Iraqi forces took control of eastern Mosul in January 2017 after 100 days of fighting, and launched the battle in the west on February 19 last year.
Daesh began a terror campaign in Iraq in 2014, overrunning vast swathes in lightning attacks.