Iraq is struggling to tighten control of its border with Syria, alarmed by a resurgent al Qaeda force that seeks to build an Islamic state across a frontier drawn in colonial times.
The Baghdad government has deployed troops and new U.S.- and Russian-made weaponry to try and cut the militants' cross-border supply lines, hoping that can kill off the threat. But as U.S. forces found before them, it is a near-impossible task.
The Syrian civil war that has inflamed sectarian tensions across the region, and a desolate geography favoring smugglers and guerrillas are just two of Baghdad's difficulties in getting a firm grip on the 600-km (375-mile) desert boundary.
Another is tribal ties that span the border, with Iraqis regularly sending food, supplies and weapons to Syrian relatives enduring that country's war. Iraq says Sunni Islamists have gone back and forth from Syria during the conflict.
Some local people, like desert tribesmen elsewhere, are reluctant even to recognize international borders.
Crucially, political and sectarian animosities felt by the Sunni population of the western province of Anbar towards the Shi'ite-led central government weaken its authority there.
"It's not winnable, to control this part of Iraq's borders," said Mustafa Alani, an Iraqi analyst at the Gulf Research Centre think-tank, referring to Anbar and its neighbor to the north, Nineveh.
"Even the Americans couldn't do it," he said, referring to the U.S. occupation of Iraq from 2003 to 2011.
Al Qaeda-linked militants, feeding off widespread Sunni resentment at perceived mistreatment by Prime Minister Nuri al-Maliki's government, swept into the Anbar cities of Falluja and Ramadi on January 1. Ramadi is now back under government control.
Maliki is trying to enlist tribal support to stamp out al Qaeda's latest incarnation in Iraq and Syria, the Islamic State of Iraq and the Levant (ISIL), whose rise has helped drive violence back to the worst level in at least five years.
His task is unusually complicated, for ISIL, which announced its formation in 2013 out of pre-existing groups, operates on both sides of the border, fighting the governments of both Maliki and Syrian President Bashar al-Assad.
Maliki said Iraqi border forces had reduced the passage of al Qaeda fighters, weapons and smugglers. "But we have not been able so far to close all the crossing points they can infiltrate due to the difficult environmental and geographic conditions," he told Reuters in an interview this week.
"There are also border cities which are half-Iraqi, half Syrian and their tribes have family connections, they are cousins."
The size of Anbar - comprising a third of Iraq's territory and bordering Syria, Saudi Arabia and Jordan - means that tenuous control of its borders is an important vulnerability.
"ISIL's expansion in Syria ... has offered a tremendous platform to recruit, train and fundraise in ways that positioned the group to both stoke and exploit sectarian tensions in Iraq," Brian Fishman wrote for the Combating Terrorism Center, a research unit at the U.S. Military Academy at West Point.
The Syrian-Iraqi border was drawn in the 1920s, when colonial powers France and Britain carved the two countries out of the remnants of the Ottoman empire after World War One.
Almost a century on, much of it remains just a line on a map.
There are two major border crossings between Iraq and Syria, one in Anbar and one in Nineveh, northwest of the city of Mosul. They are manned by Iraqi forces and fortified with blast walls, barbed wire and watchtowers.
But many minor Iraqi posts in between consist only of small, single-storey buildings with a watchtower and staffed by half a dozen security personnel.
These posts can be as much as 10 km (six miles) apart and their defenders have only light weapons and a single military vehicle, security officials said. Border guards there lack the equipment needed to monitor the frontier properly, they said.
DESERT AND SHRUB
The border in Anbar, usually patrolled by just a few thousand guards, is mostly open expanses of desert and scrub that allow ISIL fighters easy access to rear bases in Syria.
Hillsides, hidden caves and tracks have made the region a haven for smugglers for generations - and more recently for militants.
After the U.S. invasion in 2003, the border became a source of tension as an anti-American, Sunni insurgency mounted.
Iraq and the United States often accused Syria of allowing insurgents to cross the border, a charge denied by Damascus.
No one doubts that Sunni fighters flow both ways today. Some Iraqi Shi'ites are also in Syria fighting for Assad's forces.
Maliki said his government had banned the involvement of Iraqis in Syria. "We absolutely refuse to be involved in the crisis in any way," he said. "No weapons, no supplies and no fighters."
The border area features large cave systems and valleys, several of which extend for dozens of miles across the border and are used by ISIL to set up training camps, living quarters and arms depots, Iraqi security sources say.
Alarmed by the contagion spreading from Syria's war, the government launched Operation Iron Hammer on December 23 to try to break the link between ISIL in Iraq and Syria.
"We want to separate the two frontiers, as each is feeding off the other," said a senior security official in Baghdad.
Iraqi forces used Russian Mi-35 attack helicopters for the first time, as well as warplanes and U.S. Hellfire missiles supplied after Maliki visited Washington in November.
"When we cut off its funds and support by blocking the route from Iraq to Syria, al Qaeda will be finished in Syria, as it will be in Iraq," the security official said.
Iraqi military officers say the new weaponry, as well as satellite imagery and other U.S.-supplied intelligence, has given them new capabilities to hit a previously elusive enemy.
"There was some hesitation among the Americans with regard to providing us with light and heavy weapons," Maliki said.
"But after the wisdom shown by Iraq in dealing with the recent crisis ... everyone rushed, Congress and the U.S. administration, and asked us to provide a list of weapons we need to fight the terrorist gangs and al Qaeda organizations."
But the extent to which Iraq's military campaign in Anbar border regions has damaged ISIL remains uncertain.