The senior administration official said it was highly likely that troops would be kept along the Iraqi border area — away from the cease-fire zone that Vice President Mike Pence negotiated with President Recep Tayyip Erdogan of Turkey last week. The main goal would be to prevent the Islamic State from re-establishing all or parts of its religious state, or caliphate, in Syria and neighboring Iraq.

A side benefit would be helping the Kurds keep control of oil fields in the east, the official said.

Mr. Trump seemed to hint at this outcome in a message on Twitter on Sunday, saying, “We have secured the Oil.”

The senior administration official suggested that the president was balancing competing impulses: achieving the ultimate goal of bringing United State forces home from Syria — part of a signature campaign promise to pull American troops from “endless wars” — and ensuring that efforts to contain and diminish ISIS continue. The order also could be heard as at least a partial answer to those who have criticized the president’s policy.