In December 2018, before the Islamic State’s self-proclaimed caliphate collapsed, Mr. Trump issued his first of several orders to pull all American troops from the country. In turn, the Pentagon tried to shore up a plan to withdraw roughly 1,000 troops while keeping the rest spread out across the country’s northeastern corner.

In recent weeks, Mr. Trump ordered those remaining troops out, leaving a small detachment of around 200 in southern Syria — at a small outpost on the Jordanian border. Mr. Trump is also said to be in favor of leaving about 200 Special Operation forces in eastern Syria to help combat Islamic State guerrilla fighters and to block Syrian government forces and their Russian advisers from seizing several coveted oil fields in the east.

The other troops who left northern Syria in the past several days did not return to the United States, as Mr. Trump said they would. They are now based in western Iraq.

Iraq: About 6,000

The war that began as Operation Iraqi Freedom and lasted from 2003 to 2011 peaked at about 150,000 troops. Only a small detachment remained when American troops left altogether in 2011 . In 2014 , the Islamic State poured over the Syria-Iraq border and routed the Iraqi Army from Mosul, once the country’s second-largest city , and pressed south to the outskirts of Baghdad , the capital, before being repelled.

With ISIS fighters closing on Erbil , President Barack Obama started his campaign against the terrorist group, which would come to be known as Operation Inherent Resolve . The small contingent of ground troops, helping hunt terrorist targets and advise the morale-stricken Iraqi Army, grew to around 5,000 in 2016 .

That number has only increased, to roughly 6,000, as American troops move from northern Syria to western Iraq.

Saudi Arabia and other Persian Gulf nations: 45,000 to 65,000

In response to Iranian attacks and provocations since May, the Pentagon has deployed about 14,000 additional troops to the Persian Gulf region, including roughly 3,500 to Saudi Arabia in recent weeks. Those forces include airborne early warning aircraft, maritime patrol planes, Patriot air and missile defense batteries, B-52 bombers, a carrier strike group, armed Reaper drones and other engineering and support personnel.