Attacks killed eight Iraqi security forces members on Thursday, while four suicide bombers were shot dead attempting to target police, officials said.
In the deadliest attack, gunmen killed four soldiers and wounded three as they travelled to join their unit near Tikrit, north of Baghdad.
Gunmen also killed a prison guard in the northern province of Nineveh, while a bombing killed a police officer.
Four suicide bombers attempted to infiltrate federal police headquarters in Mosul, the capital of Nineveh, but were killed by security forces.
And gunmen killed an anti-Al-Qaeda Sahwa militiaman along with his brother in Samarra, while two civilians were killed and five wounded in a bombing near Baquba.
Sunni militants see the Sahwa militiaman, who sided with US forces against insurgents from late 2006 and helped to turn the tide of the war, as traitors, and often target them.
Iraqi police and soldiers are also frequently targeted in attacks by militants opposed to the Iraqi government.
Iraq has been hit by a deadly surge of violence since the beginning of the year, which experts say has been driven by widespread discontent among Iraqi Sunnis that the government has failed to address.
July was the deadliest month for Iraq in five years, according to figures compiled by the UN and the Iraqi government.