Turkey is steadily sealing its frontier with Syria, long infiltrated in both directions by fighters and smugglers, with fences, minefields, ditches and a wall that will snake even through the most mountainous regions.
"The Border is Honour", read signs across the walls of Turkish military outposts at Gulbaba and Hoyuk, visited by Reuters on a rare trip organised by the country's armed forces.
Fortification of the 911 km (566 mile) border, along with a Turkish army incursion into northern Syria launched in August last year, is helping to tighten the noose on Daesh fighters as well as curbing Kurdish rebel groups.
Rebels from a range of militias in the Syrian war, including foreign fighters joining Daesh, once slipped easily over the border. The militant group also smuggled out goods including looted antiquities to raise funds for its struggle.
Now, with US-backed rebels encircling its Syrian stronghold in the city of Raqqa, infiltration in either direction is no longer so straightforward. The clampdown has also sharply reduced the flow of Syrian refugees trying to flee the civil war.
"I can tell you that right now nobody with a vehicle or on horse can cross our border (illegally)," said infantry colonel Alparslan Kilinc, referring to the 169 km stretch from Hoyuk military post to the Turkish border town of Karkamis that his 1st Border Regiment patrols.
"It is just not possible. There are still attempts by people to cross on foot and we intervene in that."
At Hoyuk, about 80 km northwest of the shattered Syrian city of Aleppo, Turkish soldiers demonstrate their readiness. One peers through binoculars towards Syrian territory from a watchtower at the perimeter of the small walled complex. Troops called to alert slide down a pole to the ground and run to a sandbagged position or mount an armoured car.
Engineers are installing a complex set of measures across a territory that includes plains and mountains.
First comes a three-metre (10 foot) high wall, now almost complete, then a mined area. Beyond that lie ditches and fortified fences – an area patrolled by soldiers around the clock and monitored by thermal imaging cameras installed atop 25-metre high steel watchtowers to spot infiltrators at night.
Drones are also being used for surveillance.
As a result, Kilinc said, the number of smuggling attempts, which peaked in 2014 at 3,474 incidents, dropped to just 77 last year. Illegal crossing attempts fell to 8,531 from more than 12,000 over the same period.
Many of those were likely refugees, even though camps have been set up for them on the Syrian side of the border. However, 424 non-Syrian citizens were captured in 2015, with the majority thought to be Daesh fighters. Last year, that figure fell to 210, along with 49 militants from Kurdish militia.
Fighters Cut Off
Ankara was accused by some Western allies of being too slow to stop the flow of foreign fighters to Daesh in Syria and Iraq in the early years of the militant group's rise.
Turkey has rejected this, saying it needs greater intelligence sharing with allies to intercept would-be militants from the group. It has stepped up security and launched the military campaign in Syria, codenamed Euphrates Shield, to push Daesh away from Turkish borders.
Sam Heller, Beirut-based fellow at The Century Foundation think tank, said the sealing of the border had been successful, but had taken time to get underway.
"It looks like the Turks have finally, successfully, closed their last stretch of border with Daesh," he told Reuters. "They probably could have done it sooner, but this was something that was subject to other political calculations and considerations."
The Turkish campaign took the Syrian town of Jarablus on the Euphrates river, cleared Daesh fighters from a roughly 100 km stretch of the border, and then moved south to al-Bab, a strategic town now all but secured.
Asked about the passage of foreign fighters over the frontier, Kilinc said: "It is almost non-existent. The people trying to cross through here were going to places like al-Bab before. Now those places are emptied."
Kilinc's stretch has been one of the hottest spots on the frontier, having neighboured Daesh-held territory for several years until Euphrates Shield.