Donald Trump has ordered a full withdrawal of American forces from Syria, a dramatic turnaround in US policy that could potentially destabilise large parts of the country.

The US has more than 2,000 troops in Syria to support local Kurdish forces in the battle against Isis. But as the extremist group has lost most of its territory, Mr Trump was said to be eager to declare victory.

US officials said on Wednesday that a full withdrawal had been requested by Mr Trump. One official told Reuters that the pullout could take up to 100 days. Shortly after news of the plans emerged, the president appeared to tweet confirmation.

“We have defeated Isis in Syria, my only reason for being there during the Trump Presidency,” he wrote.

The White House said the extremist group’s “territorial caliphate” has been defeated, and that some troops have already begun to leave Syria.

“These victories over Isis in Syria do not signal the end of the global coalition or its campaign. We have started returning United States troops home as we transition to the next phase of this campaign,” said White House spokeswoman Sarah Sanders.

A withdrawal of US troops from Syria could have a potentially destabilising effect in the north and east of the country, where Kurdish forces have beaten back Isis and maintained a degree of order with US backing.

US officials have long warned that the recapture of Isis territory does not mean the group has been defeated. Last month, James Jeffrey, the US special representative for Syria, said that “the enduring defeat means not simply smashing the last of Isis’s conventional military units holding terrain, but ensuring that Isis doesn’t immediately come back in sleeper cells, come back as an insurgent movement”.

The withdrawal now is likely to be viewed as a betrayal by America’s Kurdish allies. The Kurdish-led Syrian Democratic Forces has been the west’s main ally in the fight against Isis in the country. With the backing of the US and UK, it has forced the extremists from swathes of the country’s north and east to this small pocket in Deir Ezzor.

But that alliance has angered Turkey, a Nato ally, which views the Kurdish forces that fight in the SDF as terrorists. Turkey’s President Recep Tayyip Erdogan vowed last week to launch a military operation into Syria against the group. The presence of US forces alongside the Kurdish fighters was seen as a bulwark against an attack.

The Independent has learned that SDF officials were caught off guard by Trump’s announcement, and have requested a meeting with their US counterparts to ask for clarity on the plans.

The Pentagon has refused to confirm or deny the withdrawal, but spokesman Colonel Rob Manning said in a statement: “At this time, we continue to work by, with and through our partners in the region.”

Republican Senator Lindsey Graham, a Trump ally and a member of the Senate Armed Services Committee, said the withdrawal of US troops would be ”a mistake”.

“An American withdrawal at this time would be a big win for Isis, Iran, Bashar al-Assad of Syria, and Russia. I fear it will lead to devastating consequences for our nation, the region, and throughout the world,” he said in a statement. “It will make it more difficult to recruit future partners willing to confront radical Islam. It will also be seen by Iran and other bad actors as a sign of American weakness in the efforts to contain Iranian expansion.”

Support free-thinking journalism and attend Independent events

The US-led coalition has focused almost exclusively on the defeat of Isis over the past four years, but in recent months its attention has broadened to include efforts to counter Iranian influence in Syria.

Britain's Foreign Office said Isis remained a threat even though it held no territory.

"Much remains to be done and we must not lose sight of the threat they pose. Even without territory, Daesh (Isis) will remain a threat," it said in a statement after the United States began withdrawing troops from Syria. "As the United States has made clear, these developments in Syria do not signal the end of the Global Coalition or its campaign. We will continue to work with members of the Coalition on achieving this."

Charles Lister, a senior fellow at the Middle East Institute and author of The Syrian Jihad: Al-Qaeda, the Islamic State and the Evolution of an Insurgency, called Trump's decision "short-sighted and naive".

"This is the greatest gift and insurance policy that Isis could have wished for at this point. Two years ago, one of Trump’s most vociferous foreign policy positions in his Presidential campaign was his accusation that Obama had 'created' Isis by withdrawing prematurely from Iraq. He could well dramatically eclipse that with this decision today. We may well be back in Syria fighting terrorism in a year or two," he said.

The US withdrawal comes as Kurdish-led forces are still fighting for the last piece of territory under the control of Isis.

The town of Hajin, on the banks of the Euphrates river in eastern Syria, is Isis’s last major holdout in the country. After three months of intense fighting, the SDF announced on Friday that it had taken most of the town. Beyond Hajin lies a string of smaller villages.

The SDF estimates that some 5,000 Isis fighters remain in that last pocket, which it will capture in the “coming weeks”, according to SDF commander Lilwa al-Abdullah.

The operation has been one of the toughest battles faced by the SDF. Whereas in previous battles Isis has made deals to retreat to other areas, there is nowhere else to escape to from Hajin.

And because it is its last holdout, the battle is being led by its most experienced fighters. There have been significant casualties on both sides. The UK-based Syrian Observatory for Human Rights said that some 793 Isis fighters have been killed since the beginning of the operation to take Hajin in mid-September, while 464 SDF fighters have died.