The attackers entered Amriyat al-Fallujah, a government-held town 50 kilometres (30 miles) southwest of Baghdad and a key base for any operation against the IS-controlled city of Fallujah, further north.
Baghdad carnage — again
"Eight suicide bombers snuck into the city, the security forces succeeded to repel the attack by killing five of them," Major General Ismail al-Mahalawi, who heads Anbar Operations Command, told AFP.
"The other three blew themselves up, which led to the killing of three civilians and two policemen," he said.
A leader of the tribal forces assisting federal forces in Anbar confirmed the death toll and said the situation had been brought back under control.
The government's "war media cell" that provides updates on Iraq's fight against the militants posted a video of fighters shooting in the air to celebrate their thwarting of the attack.
A vehicle could be seen dragging the body of an attacker on the road as pro-government fighters cheered.
Triple bombings kill 94 in Baghdad
Amriyat al-Fallujah lies around 20 kilometres (12 miles) south of Fallujah, which is one of the two main remaining cities IS controls in the country.
The other is Mosul, the country's second city, which lies in the north of Iraq and has a much larger population.
Iraqi forces have been making steady progress in Anbar this year, retaking full control of the capital Ramadi and wresting territory back from IS in several parts of the province.
Fallujah has found itself almost completely surrounded, raising concern over the fate of civilians trapped there with dwindling food supplies.
Hezbollah says 'Islamist' extremists killed military chief in Syria
The US-led coalition that backs Iraqi forces with air strikes, training and special forces on the ground, has set Mosul as its priority, hoping to deal a fatal blow to IS' self-proclaimed "caliphate".
Some key players in the mosaic of Iraqi forces involved in the war against IS however favour launching an offensive against Fallujah first.
COMMENTS
Comments are moderated and generally will be posted if they are on-topic and not abusive.
For more information, please see our Comments FAQ