WASHINGTON — President Trump is once again pursuing a national security strategy at odds with the official position of his government, ordering a pullback of American forces just inside the Syrian border. It is a move that his own senior advisers have warned would risk new chaos throughout the region.

He is demonstrating that in his pursuit of ending America’s “endless wars,” no American troop presence abroad is too small to escape his desire to terminate it. In this case, the mission has been to prevent Islamic State forces from reconstituting, and to keep another conflict at bay — a Turkish attack on Kurdish forces, including on those that have been America’s staunchest allies in the fight against ISIS.

To the Pentagon and the State Department, that is a traditional role for American troops, honed over 75 years of global leadership. But if there is a Trump doctrine around the world after 32 months of chaotic policymaking, it may have been expressed in its purest form when the president vented on Twitter on Monday morning: “Time for us to get out.”

Just this summer, the State Department’s special envoy for Syrian affairs, James F. Jeffrey, one of America’s most experienced Middle East hands, told a public forum not to worry about a precipitous withdrawal. “We plan on having a small residual force to remain on for an indefinite time,” he said. The president, he added, “is much seized with this.” But perhaps not seized the way Mr. Jeffrey imagined.