WASHINGTON — A White House official on Friday appeared to leave open the possibility that American troops could remain in Afghanistan after President Obama leaves office, in what would be a marked shift from the administration’s insistence that only a small force based at the embassy in Kabul would remain after 2016.

With the Taliban insurgency still raging, the administration has been weighing options to slow the pullout of the roughly 10,000 American troops and thousands of contractors in Afghanistan. The number of troops was supposed to be cut by almost half at the end of this year, but officials have said in recent days that Mr. Obama was nearing a decision to keep much of the current force in place well into next year to continue training and advising Afghan forces.

While most officials have said that the 2016 deadline for a pullout remains firm, Jeff Eggers, a senior National Security Council official, said Friday that discussions about what to do in the next year or so would lead to a decision about what to do in 2017, “given the intent to maintain this ongoing dialogue” with the Afghan government.

However, he added, “it still remains the intent to consolidate and complete the retrograde down to a Kabul-based security cooperation office mission in 2017.” Retrograde is a military term for the withdrawal of troops and matériel.