The murder of the US journalist James Foley by a British jihadi has reignited the barren debate in Britain about new government powers to tackle extremist Islamic groups. Dubious counter-terrorism specialists, the exact nature of their expertise frequently elusive, speak of the effectiveness of new controls in thwarting actual or potential jihadis. Much of what is said is irrelevant to the real circumstances in which Muslims leave Britain or other foreign countries to fight in Syria and Iraq. The discussion, driven by politicians responding to media hysteria, produces a sort of intellectual fog in which effective measures that can be taken swiftly disappear from view.

The point at which jihadis should be best identified, intercepted and stopped is not within Britain or even Europe, but as they cross from Turkey into Syria. The Turks have a 560-mile border with Syria and it is across this that jihadis must travel if they are to reach their destination, primarily but not exclusively the Islamic State of Iraq and the Levant (Isis), to offer their services. Those who head for Iraq must also take what Turkish journalists call "the Jihadist Highway", a network of roads across Turkey and Syria.

A glance at the map might appear to show that there are other ways of reaching the battlegrounds of Syria and Iraq, but in practice Turkey is the only feasible route for jihadis to the Sunni heartlands of both countries. They can no longer travel through Lebanon since the Syrian army and Hezbollah captured Qusayr, near Homs, and took control of the Syrian Lebanese border last year. Saudi Arabia may once have encouraged or turned a blind eye to its citizens going on jihad to Syria, but it never allowed them to travel directly from Saudi territory to Iraq. Jordan, while trying as usual to keep in with all sides, has always been nervous of being in the front line of aiding the anti-Assad opposition in Syria.

It is down the "Jihadist Highway" through Turkey that the foreign fighters have flowed in their thousands over the past three years. Turkey's open border was crucial to sustaining the Sunni armed uprising which arose out of the mostly peaceful anti-government protests of 2011. It has played the same role as the open Pakistan-Afghan border does in sustaining the Taliban. So long as Taliban fighters could retreat back into Pakistan over the 1,500-mile frontier, they could have a safe haven or sanctuary to rest and resupply before returning to the war.

For the first two years of the Syrian civil war, the route of the foreign fighters was unimpeded. According to Iraqi intelligence officials, who interrogated captured fighters, they would arrive at Istanbul or Ankara airports, move to safe houses, then travel freely by car or bus over the border crossing points into Syria. Arms and ammunition for the rebels, mostly paid for by Qatar and private donors in the Gulf, took the same route, the whole supply operation monitored and to a degree orchestrated by the CIA.

In pictures: The rise of Isis Show all 74 1 /74 In pictures: The rise of Isis In pictures: The rise of Isis Isis fighters Fighters of the Islamic State wave the group's flag from a damaged display of a government fighter jet following the battle for the Tabqa air base, in Raqqa, Syria AP In pictures: The rise of Isis Isis fighters Fighters from Islamic State group sit on their tank during a parade in Raqqa, Syria AP In pictures: The rise of Isis Isis fighters Fighters from the Islamic State group pray at the Tabqa air base after capturing it from the Syrian government in Raqqa, Syria AP In pictures: The rise of Isis Isis fighters Fighters from extremist Islamic State group parade in Raqqa, Syria AP In pictures: The rise of Isis Isis kidnapping A video uploaded to social networks shows men in underwear being marched barefoot along a desert road before being allegedly executed by Isis Getty Images In pictures: The rise of Isis Isis kidnapping Haruna Yukawa after his capture by Isis In pictures: The rise of Isis Isis kidnapping Khalinda Sharaf Ajour, a Yazidi, says two of her daughters were captured by Isis militants Washington Post In pictures: The rise of Isis Isis fighters Spokesperson for Isis Vice News via Youtube In pictures: The rise of Isis A pro-Isis leaflet A pro-Isis leaflet handed out on Oxford Street In London Ghaffar Hussain In pictures: The rise of Isis Isis fighters Isis Jihadists burn their passports In pictures: The rise of Isis Isis controls Syrian Aid A man collecting aid administered by Isis in Syria In pictures: The rise of Isis Isis controls Syrian Aid A woman collecting aid administered by Isis in Syria In pictures: The rise of Isis Isis controls Syrian Aid Local civilians queue for aid administered by Isis. Since it declared a caliphate the group has increasingly been delivering services such as healthcare, and distributing aid and free fuel In pictures: The rise of Isis Iraq crisis Iraqi security forces detain men suspected of being militants of the Isis group in Diyala province In pictures: The rise of Isis Iraq crisis Mourners carry the coffin of a Shi'ite volunteer from the brigades of peace, who joined the Iraqi army and was killed during clashes with militants of the Isis group in Samarra, during his funeral in Najaf In pictures: The rise of Isis Iraqi refugees An Iraqi Shiite Turkmen family fleeing the violence in the Iraqi city of Tal Afar, west of Mosul, arrives at a refugee camp on the outskirts of Arbil, in Iraq's Kurdistan region In pictures: The rise of Isis Isis leader Abu Bakr al-Baghdadi A photograph made from a video by the jihadist affiliated group Furqan Media via their twitter account allegedly showing Isis leader Abu Bakr al-Baghdadi delivering a sermon during Friday prayers at a mosque in Mosul. Abu Bakr al-Baghdadi declared an Islamist caliphate in the territory under the group's control in Iraq and Syria In pictures: The rise of Isis Islamic extremists destroying mosques in Iraq Shiite's Al-Qubba Husseiniya mosque explodes in Mosul In pictures: The rise of Isis Islamic extremists destroying mosques in Iraq Smoke and debris go up in the air as Shiite's Al-Qubba Husseiniya mosque explodes in Mosul. Images posted online show that Islamic extremists have destroyed at least 10 ancient shrines and Shiite mosques in territory - the city of Mosul and the town of Tal Afar - they have seized in northern Iraq in recent weeks In pictures: The rise of Isis Islamic extremists destroying mosques in Iraq A bulldozer destroys Sunni's Ahmed al-Rifai shrine and tomb in Mahlabiya district outside of Tal Afar In pictures: The rise of Isis Iraq crisis Iraqi security forces celebrate after clashes with followers of Shiite cleric Mahmoud al-Sarkhi, in front of his home in the Shiite holy city of Karbala, 50 miles (80 kilometers) south of Baghdad In pictures: The rise of Isis Iraq crisis Iraqi security forces arrest a follower of Shiite cleric Mahmoud al-Sarkhi after clashes with his followers in the Shiite holy city of Karbala, 50 miles (80 kilometers) south of Baghdad In pictures: The rise of Isis Iraq crisis Iraqi security forces arrest a follower of Shiite cleric Mahmoud al-Sarkhi at his home after clashes with his followers in the Shiite holy city of Karbala, 50 miles (80 kilometers) south of Baghdad In pictures: The rise of Isis Iraq crisis Iraqi security forces arrest a follower of Shiite cleric Mahmoud al-Sarkhi after clashes with his followers in the Shiite holy city of Karbala, 50 miles (80 kilometers) south of Baghdad In pictures: The rise of Isis Iraq crisis A vehicle burns in front of a home of a follower of Shiite cleric Mahmoud al-Sarkhi after clashes with his followers in the Shiite holy city of Karbala, 50 miles (80 kilometers) south of Baghdad In pictures: The rise of Isis Iraqi refugees An Iraqi woman holds her exhausted son as over 1000 Iraqis who have fled fighting in and around the city of Mosul and Tal Afar wait at a Kurdish checkpoint in the hopes of entering a temporary displacement camp in Khazair In pictures: The rise of Isis Iraqi refugees Displaced Iraqi women hold pots as they queue to receive food during the first day of the Islamic holy month of Ramadan, at an encampment for displaced Iraqis who fled from Mosul and other towns, in the Khazer area outside Irbil, north Iraq In pictures: The rise of Isis Isis fighters in Syria A militant Islamist fighter waving a flag, cheers as he takes part in a military parade along the streets of Syria's northern Raqqa. The fighters held the parade to celebrate their declaration of an Islamic "caliphate" after the group captured territory in neighbouring Iraq In pictures: The rise of Isis Isis fighters in Syria Isis fighters wave flags as they take part in a military parade along the streets of Syria's northern Raqqa province Reuters In pictures: The rise of Isis Isis fighters in Syria Isis fighters travel in a vehicle as they take part in a military parade along the streets of Syria's northern Raqqa province In pictures: The rise of Isis Isis fighters in Syria Fighters from the Isis group during a parade with a missile in Raqqa, Syria. Militants from an al-Qaida splinter group held a military parade in their stronghold in northeastern Syria, displaying U.S.-made Humvees, heavy machine guns, and missiles captured from the Iraqi army for the first time since taking over large parts of the Iraq-Syria border In pictures: The rise of Isis Isis fighters in Syria Isis fighters during a parade in Raqqa, Syria In pictures: The rise of Isis Isis fighters in Syria Fighters from the Isis group during a parade in Raqqa, Syria. Militants from the splinter group held a military parade in their stronghold in northeastern Syria, displaying U.S.-made Humvees, heavy machine guns, and missiles captured from the Iraqi army for the first time since taking over large parts of the Iraq-Syria border In pictures: The rise of Isis Isis fighters in Syria Isis fighters hold a military parade in their stronghold in northeastern Syria In pictures: The rise of Isis Isis fighters in Syria Isis fighters during a parade in Raqqa, Syria In pictures: The rise of Isis Isis fighters in Syria A member loyal to the Isis waves an Isis flag in Raqqa In pictures: The rise of Isis Iraq crisis Iraqi anti-government gunmen from Sunni tribes in the western Anbar province march during a protest in Ramadi, west of Baghdad. The United Nations warned that Iraq is at a "crossroads" and appealed for restraint, as a bloody four-day wave of violence killed 195 people. The violence is the deadliest so far linked to demonstrations that broke out in Sunni areas of the Shiite-majority country more than four months ago, raising fears of a return to all-out sectarian conflict In pictures: The rise of Isis Iraq crisis Iraqi security forces hold up a flag of the Isis group they captured during an operation to regain control of Dallah Abbas north of Baqouba, the capital of Iraq's Diyala province, 35 miles (60 kilometers) northeast of Baghdad In pictures: The rise of Isis Isis fighters in Iraq Isis fighters parade in the northern city of Mosul In pictures: The rise of Isis Iraq crisis Volunteers, who have joined the Iraqi army to fight against the predominantly Sunni militants from the radical Isis group, demonstrate their skills during a graduation ceremony after completing their field training in Najaf In pictures: The rise of Isis Iraq crisis Kurdish Peshmerga troops fire a cannon during clashes with militants of the Isis group in Jalawla, Diyala province In pictures: The rise of Isis Lieutenant General Qassem Atta speaks during a press conference Iraqi Prime Minister's security spokesman, Lieutenant General Qassem Atta speaks during a press conference about the latest military development in Iraq, in the capital Baghdad. Iraqi forces pressed a campaign to retake militant-held Tikrit, clashing with jihadist-led Sunni militants nearby and pounding positions inside the city with air strikes in their biggest counter-offensive so far In pictures: The rise of Isis A police station building destroyed by Isis fighters An exterior view of a police station building destroyed by gunmen in Mosul city, northern Iraq. Iraq's new parliament is expected to convene to start the process of setting up a new government, despite deepening political rifts and an ongoing Islamist-led insurgency. Iraqi President Jalal Talabani issued a decree inviting the new House of Representatives to meet and form a new government In pictures: The rise of Isis Isis fighters in Iraq Smoke billows from an area controlled by the Isis between the Iraqi towns of Naojul and Tuz Khurmatu, both located north of the capital Baghdad, as Iraqi Kurdish Peshmerga forces take part in an operation to repel the Sunni militants In pictures: The rise of Isis Iraqi refugees An elderly Iraqi woman is helped into a temporary displacement camp for Iraqis caught-up in the fighting in and around the city of Mosul in Khazair In pictures: The rise of Isis Iraqi refugees An Iraqi Christian woman fleeing the violence in the village of Qaraqush, about 30 kms east of the northern province of Nineveh, cries upon her arrival at a community center in the Kurdish city of Arbil in Iraq's autonomous Kurdistan region In pictures: The rise of Isis Iraqi refugees An Iraqi woman, who fled with her family from the northern city of Mosul, prays with a copy of the Quran AP In pictures: The rise of Isis Isis fighters in Iraq The body of an Isis militant killed during clashes with Iraqi security forces on the outskirts of the city of Samarra Reuters In pictures: The rise of Isis Iraq crisis Iraqi civilians inspect the damage at a market after an air strike by the Iraqi army in central Mosul EPA In pictures: The rise of Isis Iraq crisis Members of the Al-Abbas brigades, who volunteered to protect the Shiite Muslim holy sites in Karbala against Sunni militants fighting the Baghdad government, parade in the streets of the city AP In pictures: The rise of Isis Iraq crisis Shia tribesmen gather in Baghdad to take up arms against Sunni insurgents marching on the capital. Thousands have volunteered to bolster defences AFP/Getty In pictures: The rise of Isis Iraq crisis A van carrying volunteers joining Iraqi security forces against Jihadist militants. Prime Minister Nuri al-Maliki announced the Iraqi government would arm and equip civilians who volunteered to fight AFP/Getty In pictures: The rise of Isis Iraq Fighters of the Isis group parade in a commandeered Iraqi security forces armored vehicle down a main road at the northern city of Mosul In pictures: The rise of Isis Iraq An Islamist fighter, identified as Abu Muthanna al-Yemeni from Britain (R), speaks in this still image taken undated video shot at an unknown location and uploaded to a social media website. Five Islamist fighters identified as Australian and British nationals have called on Muslims to join the wars in Syria and Iraq, in the new video released by the Isis In pictures: The rise of Isis Iraq Al-Qa’ida inspired militants stand with captured Iraqi Army Humvee at a checkpoint belonging to Iraqi Army outside Beiji refinery some 250 kilometers (155 miles) north of Baghdad. The fighting at Beiji comes as Iraq has asked the U.S. for airstrikes targeting the militants from the Isis group. While U.S. President Barack Obama has not fully ruled out the possibility of launching airstrikes, such action is not imminent in part because intelligence agencies have been unable to identify clear targets on the ground, officials said In pictures: The rise of Isis Iraq Militants attacked Iraq's main oil refinein Baiji as they pressed an offensive that has seen them capture swathes of territory, a manager and a refinery employee said In pictures: The rise of Isis Iraq Militants from the Isis group parading with their weapons in the northern city of Baiji in the in Salaheddin province In pictures: The rise of Isis Iraq A smoke rises after an attack by Isis militants on the country's largest oil refinery in Beiji, some 250 kilometers (155 miles) north of the capital, Baghdad. Iraqi security forces battled insurgents targeting the country's main oil refinery and said they regained partial control of a city near the Syrian border, trying to blunt an offensive by Sunni militants who diplomats fear may have also seized some 100 foreign workers In pictures: The rise of Isis Iraq Militants of the Isis group stand next to captured vehicles left behind by Iraqi security forces at an unknown location in the Salaheddin province. For militant groups, the fight over public perception can be even more important than actual combat, turning military losses into propaganda victories and battlefield successes into powerful tools to build support for the cause In pictures: The rise of Isis Iraq An injured fighter (C) from the Isis group after a battle with Iraqi soldiers at an undisclosed location near the border between Syria and Iraq In pictures: The rise of Isis Iraq Fighters from the Isis aiming at advancing Iraqi troops at an undisclosed location near the border between Syria and Iraq In pictures: The rise of Isis Iraq Fighters from the Isis group taking position at an undisclosed location near the border between Syria and Iraq In pictures: The rise of Isis Iraq Fighters from the Isis group inspecting vehicles of the Iraqi army after they were seized at an undisclosed location near the border between Syria and Iraq In pictures: The rise of Isis Iraq One Iraqi captive, a corporal, is reluctant to say the slogan, and has to be shouted at repeatedly before he obeys Sky News In pictures: The rise of Isis Iraq Iraqi captives held by the extremists Sky News In pictures: The rise of Isis Iraq Iraqi captives held by the extremists Sky News In pictures: The rise of Isis Iraq Militants of the Isis group force captured Iraqi security forces members to the transport In pictures: The rise of Isis Iraq Militants of the Isis group transporting dozens of captured Iraqi security forces members to an unknown location in the Salaheddin province ahead of executing them In pictures: The rise of Isis Iraq A major offensive spearheaded by Isis but also involving supporters of executed dictator Saddam Hussein has overrun all of one province and chunks of three others In pictures: The rise of Isis Iraq Militants of the Isis group executing dozens of captured Iraqi security forces members at an unknown location in the Salaheddin province In pictures: The rise of Isis Iraq Isis militants taking position at a Iraqi border post on the Syrian-Iraqi border between the Iraqi Nineveh province and the Syrian town of Al-Hasakah In pictures: The rise of Isis Iraq Isis rebels show their flag after seizing an army post AFP/Getty Images In pictures: The rise of Isis Iraq Isis militants waving an Islamist flag after the seizure of an Iraqi army checkpoint in Salahuddin Getty Images In pictures: The rise of Isis Iraq Demonstrators chant slogans as they carry al-Qa’ida flags in front of the provincial government headquarters in Mosul, 225 miles (360 kilometers) northwest of Baghdad. In the week since it captured Iraq's second-largest city, Mosul, a Muslim extremist group has tried to win over residents and has stopped short of widely enforcing its strict brand of Islamic law, residents say. Churches remain unharmed and street cleaners are back at work

It was only in the middle of 2013 that foreign governments began to get cold feet as it became evident that armed opposition movements in Syria had become dominated by home-grown and foreign jihadis. There was a surge of reports in the foreign media, which had previously been highly supportive of the Syrian uprising, that rebel wounded were being treated in Turkish hospitals. The online journal Al-Monitor quoted a Turkish MP from the border town of Reyhani as saying that "it's only after the Salafists [Sunni fundamentalists] took over the border crossings and the Obama administration took fright that the Western media decided to report on Turkey's support for extremist groups".

Over the past year, Turkey has done something, but not nearly enough to close the border to jihadis. The problem is that the US, Britain, Turkey, Saudi Arabia and others have pretended that they are backing a powerful non-jihadi opposition movement capable of displacing Assad. This was the justification for keeping the border at least partly open. But the rebels are dominated by Isis, Jabhat al-Nusra (the official al-Qa'ida affiliate), Ahrar al-Sham and other jihadis. The Turkish Prime Minister, Recep Tayyip Erdogan, has still not quite taken on board that his campaign to get rid of Assad by backing the jihadis is bankrupt and has failed. Countries such as the US and Britain are loath to admit that they went along with this policy for too long, contributing much to the rise of Isis, and the Turkish border may now be very difficult to close.

The Turkish government protests that it gets 34 million tourists a year and cannot arrest everybody with a beard. But this does not quite ring true, since few of the tourists will be seeing the sights on the Syrian border.

Smuggling has become one of the few ways of eking out a living in these dangerous borderlands. There are 700,000 Syrian refugees in Turkey and a further 100,000-200,000 maintained by Turkey on the other side of the frontier. Fuel is heavily taxed in Turkey, so cheaper products from Isis-controlled oil wells, crudely distilled, is shipped back into Turkey. Smugglers, of course, are equally willing to use the same covert networks to move jihadis in and out of Syria.

Nevertheless, putting heavy pressure on Turkey to deploy its security forces to close this border is the most effective way to stop Isis establishing a network of adherents across the world. So far, Turkey has built a few miles of wall in a token effort to secure the border, but this will not be enough. It is unlikely that the US and its allies will ever formally ally themselves with Assad, but to isolate Isis they will have to undermine those opposed to him. It has always been absurd to imagine that it is possible to draw a line distinguishing carefully vetted anti-jihadi rebels from Isis, Jabhat al-Nusra and the others.

The Foreign Secretary, Philip Hammond, has rebuffed the idea of an alliance or co-operation with Assad, but this was never likely, or even necessary. The American and British policy of saying, as they did at the time of the Geneva 11 talks at the start of the year, that the only topic for negotiations should be about "transition" in Damascus never made much sense. Of the 14 provincial capitals in Syria, 13 are held by the government and the 14th, Raqqa, is ruled by Isis.

Foreign Secretary Philip Hammond chaired the Cobra meeting (Getty Images)

Assad was never going to step down voluntarily, and the rebels were never going to be strong enough to force him to do so. Demanding his departure as the only subject of negotiations has proved a recipe for the war continuing.

Isis, its caliphate, and the flood of foreign jihadis into Syria and Iraq are the children of this war. Towards the end of 2012, a senior British diplomat told me that he felt the belief that "the Syrian war will spread" was much exaggerated. This was the great miscalculation in Washington and London, for which Iraqis, Syrians, Turks and many others are now paying a heavy price.