"Two minibuses loaded with gunmen ambushed an army humvee in the main street in Akashat and killed seven troops and wounded one," a military spokesman for the western province of Anbar said.
Witnesses said the assailants mutilated the corpses of the dead.
The desert in the far west of Iraq along the Syrian border has seen frequent attacks by fighters against US or government targets.
The new attack on the border targeting troops is likely to inflame security tensions in Baghdad about suspected collusion by Damascus in the passage of men and weapons over the border from Syria into Iraq.
After twin waves of deadly bombings claimed by al-Qaeda in Iraq hit Baghdad last August, Iraqi officials charged that Syria was complicit in the attacks and the two governments withdrew their ambassadors.
Twin car bombing
The attack in al-Qaim came on a day in which at least 24 people were killed, including an Iraqi interpreter working for the US military and several people targeted in a pair of car bombings.
In one incident, at least eight people were killed and more than 69 injured after a car bomb exploded in Tuz Khurmatu, a town 170km north of Baghdad.
Women and children were among the casualties of the bombing, police Colonel Hussein al-Bayati said.
The attack severely damaged several surrounding houses as well as the home of Niazar Nomaroglu, a Turkmen provincial councillor, al-Bayati said.
Reports suggest the target of the attack was Nomaroglu himself, who has been targeted before on at least two separate occasions.
According to reports, he was not in the area at the time of the attack.
Tuz Khurmatu is located in the province of Kirkuk, where Iraq's majority Arabs and minority Kurds are locked in a struggle over land, wealth and power.
The other car bombing targeted the house of Mustafa Mohammed, a police captain, in Baquba, northeast of Baghdad, police said.
Two neighbours were killed and 27 other people wounded, including some of Mohammed's relatives.