At least 40 people have been killed in a wave of attacks across Iraq at the climax of Ashura, the most important Shia Muslim religious festival.
Ambushes in Baghdad are thought to have had sectarian motives
A suicide bomber killed 19 people at a mosque in Baladruz, north-east of Baghdad. In the same region, 11 people died in an attack in Khanaqin.
In the capital, at least 10 people were killed by mortar fire in the mainly Sunni district of Adhamiyah.
Ashura marks the martyrdom of the Prophet Muhammad's grandson in 680 AD.
The festival has witnessed serious sectarian violence since the 2003 US-led invasion of Iraq.
The bloodiest attack occurred when a suicide bomber wearing a belt of explosives blew himself up outside a Shia mosque in a market in Baladruz where pilgrims had gathered.
The BBC's Mike Wooldridge in Baghdad says the bombing caused shock in what is described as a usually peaceful area, not least because many of the victims were said to be children.
Earlier, medical sources said 23 people were killed but the police put the death toll at 19.
Khanaqin, the scene of previous major violence, was hit by a roadside bomb hidden in a rubbish bin as Shia worshippers held a procession through the streets to a religious hall.
Just hours later mortar shells hit residential areas in predominantly Sunni areas in Baghdad, killing at least 10 people, officials said.
It is not clear whether the mortars were in retaliation for the targeting of Shia worshippers but the record of relentless sectarian violence means it cannot be discounted, our correspondent says.
More than 100 people were wounded in the separate attacks.
In other violence, two minibuses carrying pilgrims were also ambushed by gunmen in Baghdad - at least four people were reported killed.
The attacks came as millions of Shias across Iraq commemorated Ashura in rituals to mourn the death of Imam Hussein in the battle of Karbala in the 7th Century.
Between two and three million pilgrims have visited the holy city of Karbala, south of Baghdad, over the past three days, according to police estimates.
Between two and three million Shias have visited Karbala
There have been no reports of violence there - security measures have been especially strict with several thousand extra police and troops deployed.
However, pilgrims with lengthy journeys home know they remain vulnerable, police say.
It is the first Ashura since Sunni extremists bombed an important Shia shrine in Samarra last February, sparking an upsurge in sectarian violence.