The stunning move, which runs counter to long-established US policy for Syria and the region, caught lawmakers, the Pentagon and international allies off-guard.
A withdrawal could have extraordinary geopolitical ramifications, and plunges into uncertainty the fate of US-backed Kurdish fighters who have been tackling Islamic State militants, thousands of whom are thought to remain in Syria.
Washington to withdraw troops from all of Syria, says US official
"We have defeated ISIS in Syria, my only reason for being there during the Trump Presidency," the Republican leader tweeted.
The US official told AFP that Trump's decision was finalised on Tuesday.
"Full withdrawal, all means all," the official said when asked if the troops would be pulled from across the country.
Currently, about 2,000 US forces are in Syria, most of them on a train-and-advise mission to support local forces fighting IS.
Pentagon officials scrambled for a reaction to Trump's tweet, which appeared to have been sent with scant coordination.
A spokesperson eventually said the Defense Department had "started the process" of bringing troops home.
Lawmakers assailed Trump's decision, saying it could embolden Ankara to attack US-backed Kurdish fighters.
Republican Senator Lindsey Graham, a Trump ally, said the president's decision was unwise and put the Kurds "at risk," while Democratic Senator Jack Reed said it amounted to a "betrayal" of the Kurds that "provides further evidence of President Trump's inability to lead on the world stage."
Most US troops are stationed in northern Syria, though a small contingent is based at a garrison in Al-Tanaf, near the Jordanian and Iraqi borders.
Trump has previously voiced scepticism about the US presence in Syria, saying in March he wanted to bring troops home "soon."
But the president's military advisors and international allies warned him against a precipitous pullout, and he later acquiesced to an indefinite Syria mission.
The US official would not provide a withdrawal timeline, saying only: "We will ensure force protection is adequately maintained, but as quickly as possible."
Echoing Trump, White House spokesperson Sarah Sanders said IS has been defeated territorially, but the US-led coalition that includes dozens of nations would continue fighting the militants.
"These victories over ISIS in Syria do not signal the end of the Global Coalition or its campaign," Sanders said in a statement.
The Pentagon refused to say what effect the troop withdrawal would have on air operations in Syria. These have been ongoing since late 2014.
A senior administration official, made available by the White House, said Trump's tweet was consistent with comments he has made for years.
UN authorises Syria aid deliveries for another year
"The notion that anyone within the administration was caught unaware, I would challenge that," the official said.
"It was the president's decision to make, and he made it."
A large contingent of the main US-backed, anti-IS fighting force in Syria, an alliance known as the Syrian Democratic forces (SDF), is Kurdish. Turkey terms it a "terrorist" group.
Ankara has said it plans to launch an operation against the Kurdish militia, known as the YPG (Kurdish People's Protection Units).
While the YPG has spearheaded Washington's fight against IS, US support has strained relations between the NATO allies.
In a sign of possible rapprochement, the State Department said it had approved the $3.5 billion sale of Patriot missiles and associated equipment to Turkey.
The US decision to withdraw from Syria marks a remarkable development not just for the Kurds, but for long-established US doctrine in the region.
Only last week, Brett McGurk, the special envoy to defeat IS, said "nobody is declaring a mission accomplished."
"If we've learned one thing over the years, enduring defeat of a group like (IS) means you can't just defeat their physical space and then leave," he said.
The US-led coalition on Friday had said the mission was unchanged and any reports to the contrary were "false and designed to sow confusion and chaos."
A government spokesperson for Britain, which has long supported the anti-IS campaign in Syria, said "much remains to be done" against the militants.
"We must not lose sight of the threat they pose. Even without territory, (IS) will remain a threat," the statement read.
A US presence in Syria is seen as key to pushing against Russian and Iranian influence.
Pro-Iran militias have supported Syrian President Bashar al-Assad, and Moscow in 2015 intervened in the conflict to prop him up.
Charles Lister, a senior fellow at the Middle East Institute, called the decision "extraordinarily short-sighted and naive."
"This move will look like a 'withdrawal,' not a 'victory,' and yet more evidence of the dangerous unpredictability of the US president," Lister said.
"This is not just a dream scenario for ISIS, but also for Russia, Iran and the Assad regime, all of whom stand to benefit substantially from a US withdrawal."
Russia accuses militants of firing on Syria's Aleppo with chlorine gas shells
IS swept across large swaths of Syria and neighboring Iraq in 2014, implementing their brutal interpretation of Islamic law in areas they controlled.
But they have since seen their dream of a state crumble, as they have lost most of that territory to various offensives.
In Syria, IS fighters are holding out in what remains of the pocket that once included Hajin, including the villages of Al-Shaafa and Sousa.
COMMENTS (3)
Comments are moderated and generally will be posted if they are on-topic and not abusive.
For more information, please see our Comments FAQ