American armoured vehicles with their Stars and Stripes flying were patrolling today close to the Turkish-Kurdish frontline west of the Euphrates River in northern Syria. But how long will they go on doing so in the wake of the decision by President Trump to pull 2,000 US troops from Syria, claiming there is no reason for them to be there after the defeat of Isis? And when they do go, will this open the gates to a new and possibly very bloody phase in the seven-year-long Syrian war?

Turkey says it will invade and destroy the quasi-independent Kurdish enclave, which the Kurds call Rojava, once it is no longer under American protection. They say the Kurdish militants who rule the enclave “will be buried in their ditches when the time comes”.

The main Kurdish population centres are in cities and towns on the Turkish border which are within artillery range of the Turkish regiments massing on the other side of the frontier.

If there is a Turkish invasion of this vast chunk of Syria, it will provoke a mass flight of the 2 million Kurds in the area who live in terror of a Turkish incursion. When Turkey invaded the Kurdish region of Afrin at the start of the year, half the population fled and has yet to return.

The Kurds in Syria provided the foot soldiers for the US war against Isis whose “Islamic state” once stretched in 2014 from the outskirts of Baghdad to the Mediterranean.

The Kurdish-US de facto alliance began during the Isis siege of the Kurdish city of Kobani at the end of that year when US airstrikes enabled Kurdish fighters to defeat a ferocious Isis assault.

The US had found what it had long been looking for in Syria – a reliable hardfighting military force on the ground which could call in American airstrikes as it advanced and occupied Isis strongholds.

No wonder the Kurds now feel utterly betrayed by the US. Their fighters belong to the People’s Protection Units (YPG) which provide the main fighting units of the Syrian Democratic Forces (SDF) that also contains units drawn from local Arab tribes.

Mr Trump’s tweet announcing his decision to withdraw came after the SDF captured Hajin, which was the last town in Syria held by Isis.

The Kurds in Rojava might now look for a deal with President Bashar al-Assad in Damascus, in the hope of getting the Syrian army between them and the Turkish forces. The US departure will make it easier for the Kurds to look for protection from Mr Assad.

But how much is that protection worth since the Syrian army is not strong enough to stop the Turks even if it wanted to? Would Russia, the crucial supporter of Mr Assad, go along with such a move? It would be politically difficult for the Kurds to pivot away from cooperating with the US to working with Mr Assad, who the US is supposedly trying to overthrow.

As for Russia, Kurdish leaders say President Putin will always give priority to maintaining his good relations with Turkey regardless of what happens to the Kurds.

The Syrian Kurdish leadership will be hoping that the US will not totally abandon them. They know that much of the US political, military and media establishment, along with allies like the UK and France, want the US to stay in Syria. They know that Mr Trump’s policies have been diluted or reversed before when facing such wideranging opposition.

Turkey has been making menacing threats to invade Syria in recent weeks, and Turkish television has shown reinforcements being rushed to the border. Mr Trump’s decision may have appeared to come out of the blue, but it is more likely to have been taken because of this Turkish escalation.

Mr Trump does not want to teeter on the edge of a war with Turkey into which he might be dragged if US soldiers were killed by Turkish troops advancing into Syria. He will be able to revive the US alliance with Turkey as a major Nato power once US soldiers are no longer fighting alongside the YPG, who Turkey denounce as terrorists on the grounds they are a branch of the Kurdistan Workers’ Party, which has been fighting a guerrilla war in Turkey since 1984.

So long as Turkey, Russia and Iran are working in coordination, it will be difficult for Mr Trump to pursue his principle policy in the Middle East, which is to isolate and confront Iran.

Abandoning the Kurds may seem to the White House to be a reasonable price to pay in order to improve relations with President Recep Tayyip Erdogan.

There is another cost for President Trump, as he pulls US troops out of Syria saying Isis is defeated and Isis was the only reason for US soldiers being there.

But to what extent is this really true? It is correct that Isis, which four years ago controlled a vast territory in Syria and Iraq, no longer does so. It lost Mosul in Iraq and Raqqa in Syria after long and bloody sieges in 2017. Its fighters have suffered devastating casualties. Isis no longer rules a state with a powerful army controlling, at its height, some 6 or 7 million people.

However, Isis still has potential as a guerrilla force led by skilful commanders, and this potential will be far greater if it is no longer fighting the SDF, backed by US airpower. And even if US airstrikes still happen, experience shows that to be truly effective it needs ground troops able to identify targets and occupy territory – but, according to US officials, the order to withdraw also signifies an end to the US air campaign against Isis.

Isis has always wished that its great array of enemies, called into being by its cruelty and violence, would one day turn on each other and once again create the conditions for an Isis resurgence. This may now be happening. A Turkish invasion of northern Iraq would lead to chaos, mass flight by millions, and conflict between the local Kurdish and Arab populations: it is in such anarchic conditions that Isis was born and has always flourished.