No group immediately claimed responsibility for the attack, in which at least 100 others were wounded, medics said.
A Reuters reporter said distraught survivors had attacked policemen and firefighters who tried to move them away from the scene. Puddles of blood surrounded the tent.
Iraq's delicate sectarian balance has come under growing strain from the civil war in neighbouring Syria, where mainly Sunni Muslim rebels are fighting to overthrow a leader backed by Shi'ite Iran.
Both Sunnis and Shi'ites have crossed into Syria from Iraq to fight on opposite sides of the conflict.
Al Qaeda's Iraqi and Syrian branches merged earlier this year to form the Islamic State of Iraq and the Levant, which has claimed responsibility for attacks on both sides of the border.
Around 800 Iraqis were killed in acts of violence in August, according to the United Nations.
Earlier on Saturday, four attackers killed six officers in an assault on a police station in Baiji, 180 km (110 miles) north of Baghdad.