The suicide bomber tried to enter Al-Zahraa husseiniyah, a Shiite place of worship in the city of Kirkuk, where relatives of victims from violence the day before were receiving condolences.
But the attacker was stopped by police, a high-ranking police officer said.
The bomber then detonated an explosives-rigged belt at the entrance, killing 12 people and wounding 40, according to Sadiq Omar Rasul, the head of the Kirkuk health directorate.
The attack on the husseiniyah in Kirkuk was the latest in a wave of assaults targeting both Sunni and Shiite places of worship, which have fuelled already significant sectarian tensions.
More From This Section
And in Mosul, also in the north, a suicide bomber driving an explosives-rigged vehicle killed two soldiers and wounded three, while a car bomb wounded two police and three civilians.
In the capital, car bombs hit the Shiite-majority Kamaliyah, Sadr City and Chikouk areas, killing 10 people and wounding 30, officials said, a day after 21 died in a spate of bombings in Baghdad that were mainly in Shiite areas.
With the latest attacks, 75 people have been killed in three days of violence in Iraq, and 189 have died in unrest so far this month, according to AFP figures based on security and medical sources.
The attacks came as Maliki blamed sectarianism for violence in the country.
"The bloodshed... Is a result of sectarian hatred," Maliki said in televised remarks. "These crimes are a natural result of the sectarian mindset."
Tensions are festering between the government of Maliki, a Shiite, and members of the Sunni minority who accuse authorities of targeting their community, including through wrongful detentions and accusations of involvement in terrorism.