WASHINGTON — Over the course of 24 extraordinary hours this week, 17 years of American military policy was thrown out the window as President Trump spurned his defense secretary’s plea to keep United States troops in Syria and began the long process of pulling out of Afghanistan.

On Friday morning, America’s 1.3 million active-duty service members woke up to a new reality: Their leader, Defense Secretary Jim Mattis, had resigned over the Syria withdrawal and Mr. Trump’s rejection of international alliances, and everything he and other military leaders had told them through three presidencies had suddenly been abandoned.

Terrorists must be challenged abroad before they end up here at home? No longer. Americans must defend their friends and stand up to authoritarians in places like Russia and Iran? A thing of the past.

As Mr. Trump overturned the post-9/11 national security consensus, the reverberations spanned the globe. In northeastern Syria, Special Operations troops who just the day before were fighting in the dirt around Hajin, the last Islamic State stronghold in the country, were now telling their Kurdish allies that they would be leaving them alone in the fight.