US army and Afghan National Army
In this photograph taken on August 13, 2015, US army and Afghan National Army (ANA) soldiers walk as a NATO helicopter flies overhead at coalition force Forward Operating Base (FOB) Connelly in the Khogyani district in the eastern province of Nangarhar.WAKIL KOHSAR/AFP/Getty Images [Representational Image]

The order to withdraw American troops from Syria has been signed, the US military said Sunday, after President Donald Trump and his Turkish counterpart agreed to prevent a power vacuum in the wake of the controversial move.

The announcement that US troops would leave the civil war-wracked country -- where they have been deployed to assist in the multinational fight against the Islamic State (IS) jihadist group -- shocked global partners and American politicians alike.

"The execute order for Syria has been signed," a US military spokesperson told AFP when asked about the withdrawal order, without providing further details.

Turkey was a rare ally that lauded Trump's momentous decision on Syria, a country where it will now have a freer rein to target US-allied Kurdish fighters who have played a key role in the war against IS but are deemed terrorists by Ankara.

Trump and President Recep Tayyip Erdogan spoke by telephone on Sunday and "agreed to ensure coordination between their countries' military, diplomatic and other officials to avoid a power vacuum which could result following any abuse of the withdrawal and transition phase in Syria," the Turkish presidency said in a statement.

Hours earlier, Trump had tweeted that he and Erdogan "discussed (IS), our mutual involvement in Syria, & the slow & highly coordinated pullout of US troops from the area."

Both US politicians and international allies fear the withdrawal is premature and would further destabilise the already devastated region.

A US withdrawal, said Mutlu Civiroglu, a Kurdish affairs analyst, will open the way "for Turkey to start its operations against the Kurds, and bloody war will begin."

French President Emmanuel Macron on Sunday said he "deeply regretted" Trump's decision, and that "an ally must be reliable." US troops will leave under the auspices of a new Pentagon chief set to start next month, after Jim Mattis resigned from the post citing key differences, including on Syria, with the often-impulsive Trump.

Several US politicians from both parties rejected Trump's claim that IS had been defeated, and the decision also caused alarm and dismay in the US military over the prospect of suddenly abandoning Washington's Kurdish partners. And Trump's sudden decision sparked turmoil within his administration, prompting the resignation of Brett McGurk, the special envoy to the anti-IS coalition, as well as Mattis.

Plans for the troop withdrawal will now be overseen by Deputy Secretary of Defence Patrick Shanahan, who Trump on Sunday said would replace Mattis starting January 1.

Mattis, 68, had said he would leave at the end of February to allow a smooth transition for the next chief of the world's top military power -- but a reportedly angry Trump accelerated his departure by two months.

Defence spokeswoman Dana White tweeted that Mattis would still assist in the handover, working with Shanahan to ensure the department "remains focused on the defence of our nation during this transition."

According to US media, the Republican leader voiced resentment over news coverage of Mattis' stinging resignation letter that laid bare his fundamental disagreements with the president.

Days later, special envoy McGurk made a similar move, saying he could not support Trump's Syria decision that he said: "left our coalition partners confused and our fighting partners bewildered." Unlike Mattis, Shanahan has never served in the military and has spent most of his career in the private sector.

He spent over three decades working for aircraft giant Boeing, including as vice president and general manager of Boeing Missile Defense Systems, before moving to the Pentagon as a deputy in 2017.

Until Trump finds a permanent defence leader, Shanahan will lead plans for US troops to leave Syria along with a significant drawdown in Afghanistan, both of which critics worry will leave war-torn regions at risk of continued and potentially heightened bloodshed.