Police officials say the attackers opened fire from a speeding car on the workers building a house in the village of Abara, about 65 kilometers from the Iraqi capital.
The officials say the workers were relatives from the same tribe. All officials spoke on condition of anonymity in line with regulations.
Violence has spiked in Iraq since a deadly security crackdown on a Sunni protest camp in April.
The surge in attacks has raised fears about a return of the sectarian bloodshed that pushed the country to the brink of civil war in 2006-2007.