When the Islamic State group seized swathes of territory in Anbar and elsewhere in Iraq, Haditha was one of the largest Sunni Arab population centres in the country not to fall to the jihadists.
Khalid Salman, the head of the Haditha council, said three militants infiltrated the town and clashed with security forces and tribesmen, killing two police.
The attackers were later surrounded in a house and killed, Salman said.
The officer put the total number of militants involved at four, and said the remainder were killed by security forces.
More From This Section
IS seized large areas north and west of Baghdad in 2014, but Iraqi forces backed by US-led air strikes have since regained significant ground from the jihadists.
Iraqi forces recaptured the Anbari cities of Ramadi and Fallujah from IS, and are now nearly seven months into a massive operation to retake Mosul in the country's north.