An official from Anbar province told Rudaw that a group of Isis militants ambushed a convoy of Iraqi border guards in Saqar area of eastern Rutba town, about 390km west of Baghdad.
However, AFP put the death toll at 10 and quoted a local commander as saying that the militants were disguised as military personnel when they attacked the convoy, taking advantage of a sandstorm.
The army officer said the victims of the attack were members of the border guard, the Anbar police and the army.
"Daesh (IS) members armed with assault rifles and rocket launchers attacked civilian and military vehicles carrying soldiers near Rutba", an army lieutenant colonel said.
"The Daesh members were wearing military uniforms and driving military vehicles".
Major Emad al-Dulaimi said on Monday that the attack took place the night before near the town of Rutba, in the sprawling western desert.
He said five of the 10 killed in the ambush were border guards.
It was not immediately clear who carried out the attack but al-Dulaimi blamed Islamic State.
But with the help of tribal fighters and forces from the US-led coalition, they have simultaneously pressed an offensive pushing out from Haditha, a city in western Anbar which the jihadists never took.