They said the militants attacked on two fronts near Khaldiya. The Euphrates river town lies next to a military base between the provincial capital Ramadi, seized by Islamic State in May, and their long-held bastion of Falluja.
Shi'ite militia forces, who are leading the counter-attack against Islamic State in Anbar, and Iraqi security forces have been trying to encircle Falluja as the first stage of a military campaign to recapture the two cities.
Some of the heaviest fighting took place near the villages of Husaybah Sharqiya, Mudiq and Sidiqiya, which run along the southern bank of the river west of Khaldiya, the sources said.