A suicide bomber drove a vehicle packed with explosives to a military headquarters in western Iraq and blew himself up outside it, killing 14, police said.
The attack on Thursday took place near the city of Ramadi, 100km west of Baghdad.
Another six people were injured, and most of the victims were soldiers and police officers.
Also on Thursday, gunmen killed four people in the northern province of Nineveh, including two soldiers, and wounded another in two separate attacks, one of them targeting a checkpoint.
In the northern city of Kirkuk, gunmen kidnapped and executed a lawyer, while a car bomb in a government car park wounded four people.
Violence has surged in Iraq this year to levels not seen since 2008. Attacks have killed at least 3,560 people since the beginning of 2013, according to figures compiled by the AFP news agency.
Analysts and diplomats link the increased bloodshed to anger among Iraq's Sunni Arab minority over their alleged ill-treatment at the hands of the Shia-led government.