The defining characteristics of Donald Trump’s foreign policy as president have been his lack of success against adversaries and failure to stand by allies.

The US president’s “fire and fury” diatribe, followed abruptly by the lingering tendresse for Kim Jong-un, has left the North Korean leader fully nuclear-armed and now test-firing missiles from submarines. His withdrawal from the nuclear agreement with Iran and punitive sanctions on the country has failed to make Tehran grovel. China has not backed down in his trade war. Nicholas Maduro remains in power in Venezuela despite Trump’s calls to overthrow him.

At the same time, the US president has withheld military aid from Ukraine in a blackmail attempt to get dirt on Joe Biden’s son. He has failed to take any decisive action after drone strikes on Saudi Arabia and attacks on tankers in the Gulf and he has now abandoned Kurdish allies, who have been instrumental in the campaign against Isis, to a Turkish military offensive.

The casual betrayal of the Kurds, along with the accusation, hilarious even by Trumpian standards, that they had failed to turn up for the D-Day landing (something he has just apparently discovered from a “very, very powerful article”) and total failure to acknowledge their vital role against Isis, has caused astonishment internationally and domestically and has led to severe criticism from congress republicans.

However, according to people in the State Department and the Pentagon, what happened was almost inevitable. In the constant churn of this extraordinary administration, with secretaries of states, defence secretaries, national security advisors and heads of intelligence coming and going, established decision-making processes are disappearing. Trump is increasingly isolated, but the Vietnam draft dodger who was initially so enamoured with the military that he filled his administration with them now really does seem to believe that he has a grip of foreign and defence policy with his “great and unmatched wisdom”.

In the fallout from Trump’s announcement of withdrawing US troops, which paved the way for the Turkish offensive 72 hours later, Mike Pompeo was left to defend the president and claim that he did not give Recep Tayyip Erdogan the “green light” to act. The secretary of state also said that Ankara had legitimate security concerns in northern Syria.

Yet it was diplomats from Pompeo’s own State Department who have been repeatedly warning the Turks against a Syrian operation with offers of getting the Kurds to withdraw heavy weaponry, dismantle fortifications near the border, and share intelligence with Ankara. The American presence among the Kurds numbered just a few dozen US diplomats held, but they were essential as insurance against a wide conflict breaking out as the Turks would not attack as long as they were there.

Trump’s latest defence secretary spoke to his Turkish counterpart last week, three days before Trump’s announcement. According to both American and Turkish officials, Mark Esper did not, at any time, indicate to Hulusi Akar that US troops with the Kurds would be pulled out. Instead, he forcefully urged caution.

On Monday, Jonathan Hoffman, the chief Pentagon spokesperson, said: “The Department of Defence made clear to Turkey that we do not endorse a Turkish operation in northern Syria. The US armed forces will not support, or be involved in any such operation. We will work with our Nato allies and [anti-Isis] coalition partners to reiterate to Turkey the possible destabilising consequences of potential actions to Turkey, the region and beyond.” He confirmed that defence secretary Esper and General Mark Milley, the chair of the joint chiefs of staff, have both warned their Turkish counterparts against intervention in northern Syria.

Timeline of the Isis caliphate Show all 19 1 /19 Timeline of the Isis caliphate Timeline of the Isis caliphate ISIS began as a group by the merging of extremist organisations ISI and al-Nusra in 2013. Following clashes, Syrian rebels captured the ISIS headquarters in Aleppo in January 2014 (pictured) AFP/Getty Timeline of the Isis caliphate Abu Bakr Al-Baghdadi declared the creation of a caliphate in Mosul on 27 June 2014 Timeline of the Isis caliphate Isis conquered the Kurdish towns of Sinjar and Zumar in August 2014, forcing thousands of civilians to flee their homes. Pictured are a group of Yazidi Kurds who have fled Rex Timeline of the Isis caliphate On September 2 2014 Isis released a video depicting the beheading of US journalist Steven Sotloff. On September 13 they released another video showing the execution of British aid worker David Haines Timeline of the Isis caliphate The US launched its first airstrikes against Isis in Syria on 23 September 2014. Here Lt Gen William C Mayville Jnr speaks about the bombing campaign in the wake of the first strikes Getty Timeline of the Isis caliphate Isis militants sit atop a hill planted with their flag in the Syrian town of Kobani on 6 October 2014. They had been advancing on Kobani since mid-September and by now was in control of the city’s entrance and exit points AFP/Getty Timeline of the Isis caliphate Residents of the border village of Alizar keep guard day and night as they wait in fear of mortar fire from Isis who have occupied the nearby city of Kobani Getty Timeline of the Isis caliphate Smoke rises following a US airstrike on Kobani, 28 October 2014 AFP/Getty Timeline of the Isis caliphate YPG fighters raise a flag as they reclaim Kobani on 26 January 2015 VOA Timeline of the Isis caliphate Isis seized the ancient Syrian city of Palmyra on 20 May 2015. This image show the city from above days after its capture by Isis Getty Timeline of the Isis caliphate Kurdish forces are stationed on a hill above the town of Sinjar as smoke rises following US airstrikes on 12 November 2015 AFP/Getty Timeline of the Isis caliphate Kurdish forces enter Sinjar after seizing it from Isis control on 13 November 2015 AFP/Getty Timeline of the Isis caliphate Iraqi government forces make the victory sign as they retake the city of Fallujah from ISIS on 26 June 2016 Getty Timeline of the Isis caliphate Iraqi forces battle with Isis for the city of Mosul on 30 June 2017 AFP/Getty Timeline of the Isis caliphate Members of the Iraqi federal police raise flags in Mosul on 8 July 2017. On the following day, Iraqi prime minister Haider Al Abadi declares victory over Isis in Mosul Getty Timeline of the Isis caliphate Members of Syrian Democratic Forces celebrate in Al-Naim square after taking back the city of Raqqa from Isis. US-backed Syrian forces declare victory over Isis in Raqqa on 20 October 2017 after a four-month long campaign Getty Timeline of the Isis caliphate Female fighters of the Syrian Democratic Forces celebrate in Al-Naim Square after taking back the city of Raqqa from Isis. US-backed Syrian forces declare victory over Isis in Raqqa on 20 October 2017 after a four-month long campaign AFP/Getty Timeline of the Isis caliphate Trucks full of women and children arrive from the last Isis-held areas in Deir ez-Zor, Syria in January 2019 They were among the last civilians to be living in the ISIS caliphate, by this time reduced to just two small villages in Syria’s Deir ez-Zor Richard Hall/The Independent Timeline of the Isis caliphate Zikia Ibrahim, 28, with her two-year-old son and 8-month-old daughter, after fleeing the Isis caliphate, on Saturday 26 January 2019 Richard Hall/The Independent

Trump’s subsequent actions, announced in a White House statement which, according to officials, was personally dictated by him, have left staff in the State Department and the Pentagon, where morale has plummeted during his presidency, in a state of despair. Multiple sources spoke of a sense of resignation that an impulsive president is now beyond any effective restraint.

Trump’s withdrawal declaration came on the day that the US military reported that work with the Turkish military to keep the situation defused and stable was going well, adding to confusion about what he did. Admiral James Stavridis, a former Nato military chief, told MSNBC: “Everyone was absolutely flabbergasted by this. I tell you that as a fact. Nobody saw it coming, and that is a real problem when you’re trying to conduct not only foreign policy, but also military operations. That kind of whipsawing effect is extremely detrimental, not only in this tactical situation, but strategically as our planners try and prepare in other theatres, from North Korea to Afghanistan.”

A line being put out by White House officials is that Trump had somehow called Erdogan’s bluff after the Turkish president’s repeated threats to attack the Kurdish paramilitaries. One waits to see how Turkish forces perform in the coming days. The military command and control have been hollowed out by the purges which followed the attempted coup blamed on the exiled cleric Fethullah Gulen, and that is bound to have an effect on their performance.

Ankara says that its operation is aimed at Isis as well as Kurdish militias. The first targets, however, have been the Syrian towns of Kobani, Tal Abyad and Ras al-Ayn, all held by the Kurds along the former Berlin-Baghdad highway which forms the frontier with Turkey. The reported aim is to go around 20 miles into Syria and secure the M4 highway which runs parallel to the border to Iraq.

Erdogan’s forces will be facing the Kurdish-led Syrian Democratic Forces (SDF) – well trained and armed by the west. But the Turks have the advantage of numbers, of heavy armour on relatively flat terrain, as well as air power, and it seems likely that they will reach their objectives, albeit with possible heavy bloodshed along the way.

Brett McGurk, who had served in senior national security positions under George W Bush, Barack Obama and also Trump, warned that the Turkish incursion will have severely damaging reverberations, including Isis taking advantage of the assault on the SDF to reform and strike out.

Support free-thinking journalism and attend Independent events

He also pointed out the irony of allowing Turkish forces to take Tal Abyad on the border. “Tal Abyad, a Syrian border town, was the main supply route for Isis from [June 2014] to [June 2015] when weapons, explosives and fighters flowed freely from Turkey to Raqqa and into Iraq,” he said in a series of tweets. “Turkey refused repeated and detailed requests to seal its side of the border with US help and assistance.

“In June 2015, after no action from Turkey and the border still wide open, we enabled SDF fighters to clear Tal Abyad. After the battle, Turkey sealed the border – from the SDF not Isis – and built a wall. Reports this morning are that Turkey removed its own wall to move its forces.”

McGurk continued: “After the loss of Tal Abyad, Isis organised its own foreign fighters in the town of Manbij and continued planning major attacks in Europe ... After the Paris attacks and threats growing, we enabled the SDF, over Turkey’s objections, to seize Manbij ... Since then there has been no further directed attack into Europe. It also led to an information haul enabling us to decimate Isis leadership.”

McGurk ruefully commented: “It is doubtful that Trump knows any of this history as he touts the success of defeating the caliphate (which could not have happened absent the Tal Abyad and Manbij operations) and this week ordered US forces to suddenly abandon posts near Tal Abyad.”

Dominic Raab, the British foreign secretary, said that he had spoken to Mevlut Cavusoglu, the Turkish foreign minister, “to express the UK’s disappointment and concern about the military incursion into Syria and call for restraint. The intervention risks greater humanitarian suffering and undermines the focus on countering Daesh [Isis].”