One thousand elite US troops are leaving their posts in northeastern Syria after President Donald Trump told them to withdraw.

Sources told Business Insider that the troops were struggling to get out of a fast-moving situation in which control of roads and settlements keeps shifting.

The situation is compounded by confusing orders and advancing forces from two sides, the source said.

He concluded: "Not only is the most successful international counterterrorism operation in history finished, but the winners are Syria and Russia."

Visit Business Insider's homepage for more stories.

In 24 hours, the estimated 1,000 elite US troops based in northeastern Syria to fight the Islamic State have found themselves overrun by Syrian, Turkish, and Russian military units.

It follows an abrupt series of confusing orders to conduct an immediate withdrawal, taken in the wake of US President Donald Trump's decision to pull out of the region and allow Turkey to invade.

Read more: Trump hits Turkey with sanctions over military operation against Kurds in Syria

US troops had occupied a series of command and observation posts along the Syria-Turkey border as part of a mission to lead the Syrian Democratic Forces, a mostly Kurdish militia, against the Islamic State.

The region was thrown into chaos in the past week, however, by a Turkish incursion into the area designed to confront the armed Kurdish groups there.

The hasty withdrawal was announced Saturday by President Donald Trump, who said all US troops in Syria would withdraw as soon as possible, barring a single base in the desert along the Syria-Jordan border.

US units were soon faced with heavy artillery strikes by Turkey that on Sunday appeared to target US positions. They also had to deal with fast-shifting control of cities and major motorways that were their pathway out of the country.

As of Tuesday at least one small unit of US forces, estimated to consist of 50 to 100 soldiers, was trapped by advances from two sides: by the Turkish forces along the border and Russian-backed Syrian government forces, who began arriving into the formerly Kurdish controlled cities of Raqqa, Manbij, Kobani, Qamishli, and Ayn Issa.

"Two [observation posts] were located in the area around Kobani and these units were cut off from the rest of Rojava by the Turkish advance on one side and the arrival of regime militias from the west into Manbij," said a Western military official who until recently had worked closely with the SDF.

"They will have to find a way around as the Syrians and Turkish feel each other out in these contested towns.

"So not only is the most successful international counterterrorism operation in history finished, but the winners are Syria and Russia, who didn't even participate in the operation," the official said.

Read more: Disaster is unfolding in Syria as videos emerge of US allies being slaughtered and as hundreds of ISIS prisoners escape during airstrikes

Russian and Syrian national flags fluttering on military vehicles near Manbij, Syria, on Tuesday. REUTERS/Omar Sanadiki

"The US and UK now can't hope to save the anti-ISIS program, they can only hope their people get out of the way before they get hurt. It's a demoralizing turnabout."

The official — who is under orders not to discuss the situation with the media — expressed frustration at the past week of conflicting orders from top US officials.

He described three sets of orders from senior commanders: First was a total stand-down, in which troops would cease operations but stay put. Second was a partial withdrawal from their bases. Finally came instructions for a near-complete departure, effectively ending the five-year mission that killed and captured tens of thousands of Islamic State fighters and cleared eastern Syria's major population centers of the group.

The source said: "The French and UK have smaller special forces units [in Syria] than the Americans so it's not that much trouble to withdraw them safely. But the equipment and support operation that backed them and the rest of the coalition forces isn't like 20 well-trained commandos you can just tell to pack up and get out."

Read more: Trump has delivered what Russia wants in Syria — at zero cost — and 'Putin likely can't believe his luck'

Syrian troops in the Syrian town of Ain Issa in a handout released by SANA on Monday. SANA/Handout via REUTERS

"The Americans have a much bigger footprint, and their commanders have been left holding the bag," the person said. "They need to wind down the operations, protect and remove all their logistical equipment, and move 1,000 soldiers safely through a war zone. It's a lot to ask even the best-trained troops in such short notice, under such chaotic conditions."

An SDF official near the city of Manbij confirmed reports that the US garrison in the base in that city had withdrawn.

In the process it ceded control of the base to mercenaries from the Wagner Group, a Russian private military company that supports Syrian military operations.

One Russian journalist embedded with the mercenary group posted video from the base in which he said the US troops left on Monday:

Read more: Trump imposed sanctions on Turkey only after advisers explained to him the obvious consequences of letting them invade Syria, report says

The SDF official confirmed its accuracy.

"The Russians are in the American base in Manbij now, they helped escort the Americans out of the area and got their base in return," the SDF official said. "I think the Russians will move into all of the American bases in Syria soon."

Pentagon leadership on Monday night said that its primary focus was a safe withdrawal of its forces and that it had assigned air support for each moving pocket of US troops.

As groups of US commandos gather at rally points away from the fighting, they will have air cover for a move into northern Iraq, where the US maintains multiple bases with the permission of the Iraqi government.

How long this pullout will take remains unclear. US officials recently told CNN that it could be a matter of days, or as long as several weeks.

But with Syrian and Turkish troops on an apparent collision course Tuesday, there might not be that much time for a safe departure.