the northern city of Kirkuk on Tuesday, which also wounded 26 people, police and a doctor said.
The bomb exploded as worshippers left the mosque after marking the start of the Eid al-Adha Muslim holiday.
Bodies, their clothes covered in blood, were placed in the back of a police pickup truck to be taken away, an AFP journalist reported.
Angry and grieving people railed against those behind the attack, shouting: "God take revenge on those who are evil!"
Worshipper Khalaf al-Obaidi said he narrowly avoided being caught the blast after he went to greet one of his brothers inside the mosque instead of leaving.
"You look and you see your friend or your brother or your relatives (on the ground). Even an infidel would not do this," he said. "God willing, there will be security and safety for this country and its poor people."
Hours after the fatal blast, a study by university researchers the US, Canada and Baghdad said that nearly half a million people have died from war-related causes in Iraq since the US-led invasion a decade ago.
That figure is far higher than the nearly 115,000 violent civilian deaths reported by the British-based group Iraq Body Count, which bases its tally on media reports, hospital and morgue records, and official and non-governmental accounts.
The new study, published in the US and conducted in cooperation with the Iraqi Ministry of Health, covers not only violent deaths but other avoidable deaths linked to the invasion, insurgencies and subsequent social breakdown.
It differs from some previous counts by spanning a longer period of time and by using randomised surveys of households across Iraq to project a nationwide death toll from 2003 to mid-2011.
Violence caused most of the deaths, but about a third were indirectly linked to the war, and these deaths have been left out of previous counts, said lead author Amy Hagopian, a public health researcher at the University of Washington.
Those included situations when a pregnant woman encountered difficult labour but could not leave the house due to fighting, or when a person drank contaminated water, or when a patient could not get treated at a hospital because staff was overwhelmed with war casualties.
"I think it is important that people understand the consequences of launching wars on public health, on how people live. This country is forever changed," Hagopian told AFP.
Eid al-Adha, which commemorates the willingness of Abraham (Ibrahim in Arabic) to sacrifice his son at God's command, is the biggest Muslim holiday of the year.
In Iraq, as around the Islamic world, people mark the holiday by slaughtering an animal, normally a sheep, and giving the meat to the poor.
As with various other religious occasions in Iraq, observance differs between Sunnis and Shiites.
"We ask God to keep the ghost of sectarian strife... and civil war, on which those who sold their soul to the devil are insisting, away from our country," Prime Minister Nuri al-Maliki said in pre-recorded remarks broadcast on Tuesday.
Other attacks in Kirkuk, Nineveh and Baghdad provinces on Tuesday killed three people and wounded three more, officials said.
Almost nothing is safe from attack by militants in Iraq, and violence has reached a level not seen since 2008, when the country was just emerging from a brutal sectarian conflict.
Secure targets such as prisons have been struck in recent months, along with caf?s, markets, mosques, football fields, weddings and funerals.
Attacks on both Sunni and Shiite gatherings have raised fears of a relapse into the intense sectarian bloodshed that killed tens of thousands of people in 2006-2007.
Analysts say the Shiite-led government's failure to address the grievances of Iraq's Sunni Arab minority -- which complains of being excluded from government jobs and senior posts and of abuses by security forces -- has driven the surge in unrest.
Violence worsened sharply after security forces stormed a Sunni anti-government protest camp in northern Iraq on April 23, sparking clashes in which dozens died.
And while the authorities have made some concessions aimed at placating anti-government protesters and Sunnis in general, such as freeing prisoners and raising the salaries of Sunni anti-Al-Qaeda fighters, underlying issues remain unaddressed.
The government has enacted new security measures, stepped up executions and carried out wide-ranging operations against militants for more than two months, but has so far failed to curb the violence.