WASHINGTON — President Donald Trump on Sunday said America must “stop the endless wars” and has begun the withdrawal of troops and equipment from Syria, in keeping with his recent pledges to end U.S. involvement in that conflict.

The comments came two days after Pentagon officials confirmed they have begun moving military equipment out of the region and begun planning the extraction of about 2,000 U.S. troops from the country. Military officials have said they will not reveal exact timetables or withdrawal details for security reasons.

Trump, in a series of tweets on Sunday, said the “long overdue pullout from Syria” would not disrupt American efforts to stabilize the region. He said despite the moves, American forces are still “hitting the little remaining ISIS territorial caliphate hard, and from many directions” and said remaining U.S. forces in the region would protect Kurdish allies from Turkey.

“Russia, Iran and Syria have been the biggest beneficiaries of the long term U.S. policy of destroying ISIS in Syria - natural enemies,” he wrote. “We also benefit but it is now time to bring our troops back home. Stop the ENDLESS WARS!”

White House officials have worked to defend the sudden shift in Syria policy for weeks, since it became public last month. The planned rapid withdrawal of forces appeared to be a factor in the resignation of Defense Secretary Jim Mattis, who in his departure letter voiced concerns about America abandoning foreign allies.

U.S. troops have been operating in Syria for the last four years under the larger mission of combating Islamic State militants in the Middle East. Pentagon and intelligence officials have said that while friendly forces have made significant progress in the fight, the group still remains a threat.

Last week, national security adviser John Bolton said American troops will not fully leave Syria until ISIS is defeated and allies are assured protection. That seemed to hint at a slowdown in Trump’s initial plans for a rapid withdrawal from the region, but administration officials have downplayed reports of internal conflict over the issue.

In recent weeks, Trump has said multiple times that ISIS has been nearly completely wiped out because of policy changes made after he took office.

Senators briefed on the Syria plans last week voiced continued concerns about the withdrawal plan, saying it could give a boost to both ISIS fighters and foreign adversaries still operating in the area like Iran and Russia.

Trump in his 2016 presidential campaign promised more American military spending but less U.S. involvement in foreign fights. Since his election, however, he has deferred to military officials who have requested more military personnel in the Middle East, Afghanistan and other overseas conflict areas.