The Pentagon has begun removing all its troops in northern Syria, a US official said Monday, after President Donald Trump ordered them to leave in the face of Turkey's attacks on Kurds in the area.

Nearly 1,000 troops will vacate the country, leaving behind only a small contingent of 150 in the southern Syria base at Al Tanf, the official said.

"We are executing the order," the official told AFP.

Turkish President Recep Tayyip Erdogan has been pressing a deadly assault against Kurdish forces -- a key US ally in the five-year battle to crush the Islamic State group -- in northeastern Syria since Wednesday last week.

Trump, whose order to pull back US special forces from the border effectively triggered the incursion, has faced a firestorm of criticism for appearing to give NATO member Turkey the green light for the push.

On Sunday Defense Secretary Mark Esper said Trump had ordered the withdrawal of the remaining troops deployed in northern Syria, with the US seeking to avoid getting caught between two allies.

But Esper did not make clear whether the troops would simply pull back to a position further south or quit the country completely.

Trump's critics accuse him of abandoning the Kurdish-led Syrian Democratic Forces, who Ankara says support Kurdish rebels inside Turkey.

Earlier Monday Trump said he planned "big sanctions" against Turkey for the attacks into Syria, but also criticized the Kurds for allegedly trying to suck US forces into the conflict.

He suggested the Kurds were releasing Islamic State prisoners in their custody "to get us involved" in the conflict.

"Do people really think we should go to war with NATO Member Turkey?" Trump said, ruing "never ending wars."

"The same people who got us into the Middle East mess are the people who most want to stay there!"