Police say the attack happened in a village near Al-Miqdadiyah, about 90 kilometers north of the Iraqi capital, Baghdad. Women and children were among the dead.
An Iraqi Army spokesman said the gunmen were wearing Iraqi military uniforms.
Meanwhile, in the capital today, police say a car bomb exploded near the Iranian Embassy, killing four people and wounding several others.
The latest violence comes a day after a triple bombing on July 16 in the northern city of Kirkuk, in which more than 80 people were killed and 200 injured.
RFE/RL Iraq Report
SUBSCRIBE For weekly news and analysis on Iraq by e-mail, subscribe to "RFE/RL Iraq Report."