The losses were the latest in a series of setbacks for Iraqi forces, which are struggling to hold their ground in the face of an insurgent onslaught that has displaced hundreds of thousands of people and sparked fears that the country could be torn apart.
The militants, led by the jihadist Islamic State of Iraq and the Levant (ISIL), seized the towns of Rawa and Ana after taking the Al-Qaim border crossing on Saturday, residents said. They then gunned down 21 local leaders in Rawa and Ana in two days of violence, according to officers and doctors.
The government said its forces made a "tactical" withdrawal from the towns, control of which allows the militants to open a strategic route to neighbouring Syria where they also hold swathes of countryside along the Euphrates river valley.
ISIL aims to create an Islamic state incorporating both Iraq and Syria, where the group has become a major force in the rebellion against President Bashar al-Assad.
Govt said its forces made a "tactical" withdrawal from the towns
Washington wants Arab states to bring pressure on Iraq's leaders to speed up government formation, which has made little headway since April elections, and has tried to convince them ISIL poses as much of a threat to them as to Iraq.
"We're going to have to be vigilant generally," US President Barack Obama said in an interview aired yesterday on CBS. Obama said ISIL's offensive could destabilise other countries in the region and "spill over into some of our allies like Jordan."
US leaders have stopped short of calling for Shiite Prime Minister Nuri al-Maliki to step down, but there is little doubt that they feel he has squandered the opportunity to rebuild Iraq since US troops withdrew in 2011. The seizure of Al-Qaim leaves just one of three official border crossings with Syria in federal government hands.
The third is controlled by Kurdish forces. Militants already hold areas of the western desert province of Anbar which abuts the Syrian border, after capturing this year all of one city and parts of another. Near Anbar's capital Ramadi, parts of which are held by anti-government fighters, a suicide bombing and a car bomb killed six people and wounded eight, officials said.