Two bombs exploded near a funeral procession in the Iraqi city of Baquba on Tuesday, killing 20 people, police and a doctor said.
The blasts in the capital of Diyala province, 60 kilometres (37 miles) north of Baghdad, also wounded 28 people, the sources said.
Mourners were carrying the body of a teacher who was shot dead the previous night to a cemetery when the blasts occurred.
Signup to our newsletter and follow us on Facebook and Twitter!
Militants frequently attack events and places where crowds of people gather, including funerals, weddings, mosques, markets and cafes, in an attempt to cause maximum casualties.
The Baquba blasts came as militants seized control the entire northern province of Nineveh, including its capital Mosul.
Militants have launched major operations in Nineveh, Anbar, Diyala, Salaheddin and Baghdad provinces since Thursday, killing scores of people and highlighting both their long reach and the weakness of Iraq's security forces.
Violence is running at its highest levels since 2006-2007, when tens of thousands were killed in sectarian conflict between Iraq's Shiite majority and Sunni Arab minority.