U.S. troops patrol at an Afghan army base in Logar province. (Omar Sobhani/Reuters)

The U.S. military is drafting plans to withdraw a few thousand troops from Afghanistan while continuing all major missions in the longest war in American history, U.S. officials said, three weeks after President Trump sought options for a more drastic pullout.

The planning is underway after Trump ordered the Pentagon to prepare the withdrawal of up to half of the roughly 14,000 U.S. troops deployed in Afghanistan, six officials said. The officials, who work in several parts of the government, spoke on the condition of anonymity because of the sensitivity of the discussions.

Trump still wants to remove troops from Afghanistan — eventually all of them — but the current withdrawal probably will be far fewer than 7,000, two senior White House officials said. Military advisers have convinced him that a smaller, and slower, withdrawal is best for now — although officials cautioned that a final decision had not been reached and that the president could order a full pullout at any moment.

“Trust me, he’s heard every single argument on Afghanistan he could hear,” one administration official said, adding that the president continues to complain that many of his advisers want him to stay in “all these wars forever.”

Several officials who described the plan were hesitant to name a specific number, citing the evolving nature of the discussions. But some said it could be about half of what Trump was initially seeking.

That would mark nearly a full rollback of the 3,900-troop increase Trump authorized in August 2017, after months of internal debate and strong advocacy from then-Defense Secretary Jim Mattis, who resigned last month.

It also would stand as a symbol that Trump is serious about getting out of the war, even if he is convinced for now that it is not possible.

“The president is very frustrated about our progress in Afghanistan,” said Sen. Lindsey O. Graham (R-S.C.), a confidant of the president. “But an immediate withdrawal would be an unmitigated disaster because Afghanistan is the center of gravity in the war on terror.”

The discussions about Afghanistan come as Trump and his advisers more publicly discuss a military withdrawal in Syria, which was ordered the same week Trump asked for withdrawal plans for Afghanistan. Mattis resigned afterward, citing differences of opinion with the president. Trump initially said he wanted all 2,000 troops out of Syria within 30 days but has since said the exit will be done in an orderly fashion.

But the war in Afghanistan — far costlier and with more troops involved — has mostly stayed out of the spotlight. In a rare exception, Trump caustically derided it during a Cabinet meeting Jan. 2 and attempted to tie the military stalemate there to Mattis.

“What’s he done for me? How has he done in Afghanistan? Not too good. Not too good,” Trump said. “I’m not happy with what he’s done in Afghanistan, and I shouldn’t be happy.”

The Pentagon has been virtually silent about the situation since then, as it attempts to walk a fine line between reassuring U.S. allies and Afghan partners and not getting out in front of the president.

Marine Gen. Joseph F. Dunford Jr., chairman of the Joint Chiefs of Staff, and Army Gen. Austin “Scott” Miller, the top U.S. commander in Afghanistan, said late last month that they have received no new orders for the war, and three U.S. officials said Monday that remains the case.

Miller, speaking in a meeting last month broadcast by the Afghan television station Tolo, sought to reassure Afghans that even if there is a partial withdrawal coming, U.S. troops will remain alongside their Afghan counterparts.

“If I do get orders, I think it’s important for you to know that we are still with the security forces,” Miller said. “Even if I have to get a little bit smaller, we’ll be okay. We’ve thought about this before, and we will be able to do the things that you require in terms of support.”

Reports last month of Trump’s plans for Afghanistan, and his subsequent harsh comments about the direction of the war, triggered alarms in Kabul and among current and former U.S. officials. American diplomats, led by envoy Zalmay Khalilzad, have sought to negotiate a peace settlement with the Taliban, and their position in part relies on the idea that the U.S. military is not leaving until the conditions on the ground are right.

A Pentagon spokesman, Army Col. Rob Manning, offered a one-sentence response to questions about where the military stands on an Afghanistan drawdown plan right now.

“The Department of Defense remains in support of Ambassador Khalilzad’s reconciliation efforts in Afghanistan,” he said.

Christopher D. Kolenda, a retired Army colonel involved in previous rounds of peace talks with the Taliban, said U.S. officials are now probably trying to put reports of a steep Afghanistan withdrawal “back in the box,” considering the harm they could cause negotiations. The withdrawal of troops, he said, should occur only after the Taliban makes promises in negotiations and follows through on some of them.

“Unilateral troop withdrawals simply eviscerate the leverage of our negotiator,” said Kolenda, who now leads the Strategic Leaders Academy, a leadership development firm. “When you’re in negotiations, forfeiting more of your leverage voluntarily is strategic malpractice.”

Erik Goepner, a retired Air Force colonel who is now a scholar with the libertarian Cato Institute, said that he remains in favor of withdrawal from Afghanistan but that Trump’s behavior suggests a problematic lack of concern for details.

“In a combat environment, when you’re not concerned with details it can lead to loss of life,” said Goepner, who commanded a unit in Afghanistan in 2010. “Any time you’re moving to an end state — and this case, the end state is let’s reduce our forces — and you are not coherent in how you do that, you introduce an incredible amount of risk, and that goes to the lives of Americans and some Afghans that we fought alongside.”

On Monday night, the president took aim at enduring U.S. conflicts abroad in another tweet.

“Endless Wars, especially those which are fought out of judgement mistakes that were made many years ago, & those where we are getting little financial or military help from the rich countries that so greatly benefit from what we are doing, will eventually come to a glorious end!” he wrote.

Anne Gearan and Missy Ryan contributed to this report.