
Seven others were wounded in the attack, which took place in the mainly Shia Ubaidi neighborhood of eastern Baghdad and targeted worshippers leaving the mosque, police said.
"The suicide attacker was trying to enter the mosque before a guard stopped him, but he blew himself up," said one policeman near the scene of the attack.
Suicide bomb in Baghdad kills at least 18: medics
In a statement posted online, Islamic State said the attack targeted "rejectionists", a term used by the militants to describe Shia Muslims.
Police said a search operation was immediately started to chase any possible accomplices.
Iraq political dispute leads to gunfire at TV station
A total of 888 Iraqis were killed and another 1,237 injured in acts of "terrorism, violence and armed conflict" in November, according to figures from the United Nations.
Baghdad was the worst affected governorate, with 325 killed.
COMMENTS
Comments are moderated and generally will be posted if they are on-topic and not abusive.
For more information, please see our Comments FAQ