A co-ordinated car and suicide bomb attack on a Shi'ite mosque in the Iraqi capital killed at least 33 people on Wednesday evening, police and medical sources said.
Worshippers were leaving the mosque after evening prayers when the car bomb exploded, and as onlookers rushed to help the wounded, a suicide bomber blew himself up in their midst.
Policemen saw a second man fumbling to detonate an explosive belt and managed to stop him, but an angry mob overcame them and stabbed the would-be-suicide bomber him to death.
A further 55 people were wounded, some critically, in the blasts, which took place in the northwestern Kasra district of Baghdad.
It was not immediately clear who had carried out the attack, but Sunni Islamist militants who view Shi'ites as non-believers, have been regaining momentum and striking on a near daily basis this year.
More than two years of civil war in neighbouring Syria have brought sectarian tensions to the boil in Iraq and the wider region.
About 800 Iraqis were killed in August, according to the United Nations, with more than a third of the deadly attacks happening in Baghdad.
The bloodshed, 18 months after U.S. troops withdrew from Iraq, has stirred concerns about a return to the sectarian slaughter of 2006-7, when the monthly death toll sometimes topped 3,000.