Ten people were also shot and killed in Muqdadiya, 80 km (50 miles) northeast of Baghdad, security and hospital sources said.
The rise of Islamic State, whose harsh form of Sunni Islam is rejected by most leading Muslim authorities, has exacerbated a long-running sectarian conflict in the country, mostly between the Shia majority and minority Sunnis.
A surge in such violence could undermine efforts by Prime Minister Haider al-Abadi, a moderate Shia, to dislodge the militants from large swaths of the north and west that they seized in 2014.
At least two Sunni mosques south of Baghdad were attacked last week after a Shia cleric was executed in Saudi Arabia, triggering angry reactions in Iraq and neighbouring Iran.
12 killed as gunmen take hostages in Baghdad mall: police
At the height of Iraq's civil war nearly a decade ago, such mosque attacks often unleashed revenge killings and counter attacks across the country.
Iraqi officials tried on Tuesday to head off further violence, condemning the mosque attacks as well as Monday's bombings.
Abdul Lateef al-Himayim, head of Iraq's government body overseeing Sunni religious sites, called them "a desperate attempt to destroy Iraqi unity".
Haqqi al-Jabouri, a member of the local council in Diyala province where Muqdadiya is located, said both types of attacks hurt the social fabric of the community.
He blamed "undisciplined (Shia) militias" for burning the mosques.
Shia militias were critical in keeping Islamic State from overrunning Baghdad and southern Shia shrines during their lightning advance across the Syrian border in 2014, and have supported Iraqi forces pushing back the militants, including from parts of Diyala.
Potent threat: IS bombers kill 12 policemen at Iraq’s military base
Militia elements have been accused of human rights abuses against Sunnis, allegations the groups have repeatedly denied or blamed on rogue members.
Amal Omran, a Shia member of the Diyala council, blamed the mosque attacks on "infiltrators" seeking to smear the image of the militias.
Witnesses said some of those killed on Tuesday had been shot inside their homes or dragged into the street and executed by gunmen wearing black and camouflage uniforms.
Police sources and local residents said the gunmen were patrolling Muqdadiya and warning families through loudspeakers to leave the city or face death.
Reuters could not verify these accounts.
"It's worse than hell. I hid my two sons under a pile of clothes inside a wardrobe to avoid being discovered," said Um Ibrahim, a Sunni widow who fled to nearby Khanaqin after seeing two mosques engulfed by black smoke.
The attacks were in the central districts of Mualimeen, Asri and Orouba, the security sources said.
Eight Islamic State commanders killed in air strikes
Police Targeted
Violence against Iraqi security forces continued on Tuesday in Diyala when a suicide bomber attacked a police convoy, critically wounding a senior police officer and killing three other members of the security forces, police said.
Brigadier Qasim al-Anbuki, the local head of police intelligence, was leading a force to check tips about a suspected car bomb parked on a highway linking Baghdad to Baquba, Diyala's provincial capital.
After reaching the site, a suicide car bomber detonated his vehicle near the officer's convoy, two police sources said.
Four others were also wounded, they added.
There was no immediate claim of responsibility for the blast.
Abadi condemned a separate attack on Monday at a mall in a predominately Shia district of Baghdad that killed 18 people.
He called it "a desperate attempt by terrorist gangs after our forces' victories in Ramadi and other areas".
The Iraqi government last month claimed victory against Islamic State in the western city of Ramadi, and has slowly pushed them back in other areas.
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