Donald Trump’s sudden decision to pull US troops out of Syria, and slash the numbers deployed in Afghanistan, came as a nasty shock to Britain, regional allies such as Israel, and to many in his own administration and Republican party. Although he had threatened such action in the past, his wiser, more experienced advisers had succeeded in restraining him – until last week, when the president finally got away from the White House “grown-ups” and went rogue.

Trump’s move proved the final straw for James Mattis, the defence secretary and last of the old guard, whose relationship with the president was already strained. In his resignation letter, Mattis did not specifically mention Syria and Afghanistan but he warned that Trump was placing US security at risk by letting down and denigrating America’s friends and allies.

“While the US remains the indispensable nation in the free world, we cannot protect our interests or serve that role effectively without maintaining strong alliances and showing respect to those allies,” Mattis wrote pointedly.

Pro-western Kurdish forces in north-east Syria share that sentiment. They have been stalwart allies of the US and its European partners in the largely successful fight to degrade and destroy Islamic State. Now they face the prospect of a cross-border attack by the Turkish military, which regards them as a threat to national security, without US air support or ground protection.

Kurdish cries of betrayal seem wholly justified. Having been abandoned by Trump, they can be expected, in their turn, to abandon the struggle against Isis as they concentrate on their own survival.

James Mattis resigned as the US defence secretary with a pointed dig at Trump’s troop withdrawals. Photograph: Mike Blake/Reuters

Since the Syrian civil war erupted in 2011, the priority for Recep Tayyip Erdoğan, Turkey’s president, has been combating moves towards Kurdish self-determination, which he fears could spread to south-east Turkey. He has repeatedly threatened a new incursion into Syria in recent days, similar to the one launched in Afrin earlier this year.

When Erdoğan spoke to the White House by telephone last week, US officials said they expected Trump to tell him to back off. Instead, Trump caved in, informed Erdoğan of the US withdrawal, and effectively gave him a green light to invade.

There is a suspicion that Trump is in awe of tough, authoritarian “strongman” leaders such as Erdoğan, Russia’s Vladimir Putin and North Korea’s Kim Jong-un and would emulate them if he dared. As it is, he kowtows and seeks their approval. Naturally, both Putin and Erdoğan welcomed the pullout, giving Trump the praise he craves.

Syria’s dictator, Bashar al-Assad, will be gratified too, as will his allies in Iran. US Republican senators quickly pointed out that, by his decision, Trump has effectively “lost Syria” for the west and confirmed the victory of the pro-Assad forces. Assad may now feel emboldened to launch an assault on Idlib, Syria’s last holdout province.

Less happy are the Saudis, who rely on US support in their proxy wars with Iran in Yemen and elsewhere. They will fear further American disengagement. Another ally, Benjamin Netanyahu, Israel’s prime minister, refrained from criticism but said he would escalate Israeli military action against Iranian-aligned forces in Syria and Lebanon following the US decision.

The prospect of new fighting spreading along Syria’s northern and south-western borders is alarming humanitarian agencies and could undermine fragile peace talks. “It doesn’t take much imagination to see how relative stability could be replaced by chaos. Thousands could be displaced if the wrong decisions are taken,” David Miliband, head of the International Rescue Committee, said.

Trump’s troop withdrawals also pose a conundrum for Britain and France, which both have military units engaged in Syria and Iraq. Downing Street said it had been consulted in advance and opposed it, but was clearly not listened to.

Responding to a Trump request to Nato, and despite well-founded misgivings, Britain increased its troop numbers in Afghanistan this year. Presumably they must now watch the Americans march away.

It was a good week for Isis. The pressure is off in Syria, while its vicious urban bombing campaign in Afghanistan prospectively faces less resistance. It now has a chance to regroup and regain the initiative to threaten the west again. Analysts fear it could be “Iraq all over again” – a reference to the way the jihadists came back from the dead and swept to power in Mosul and Raqqa after the US quit in 2011 with the job unfinished.

Trump “will lose the peace by withdrawing” tweeted retired US army general Jack Keane. “Isis will re-emerge, Iran a greater threat, will own all of Syria, Israel more in danger.”