WASHINGTON — The Trump administration has ordered the military to start withdrawing roughly 7,000 troops from Afghanistan in the coming months, two defense officials said Thursday, an abrupt shift in the 17-year-old war there and a decision that stunned Afghan officials, who said they had not been briefed on the plans.
President Trump made the decision to pull the troops — about half the number the United States has in Afghanistan now — at the same time he decided to pull American forces out of Syria, one official said.
The announcement came hours after Jim Mattis, the secretary of defense, said that he would resign from his position at the end of February after disagreeing with the president over his approach to policy in the Middle East.
The whirlwind of troop withdrawals and the resignation of Mr. Mattis leave a murky picture for what is next in the United States’ longest war, and they come as Afghanistan has been troubled by spasms of violence afflicting the capital, Kabul, and other important areas. The United States has also been conducting talks with representatives of the Taliban, in what officials have described as discussions that could lead to formal talks to end the conflict.
Senior Afghan officials and Western diplomats in Kabul woke up to the shock of the news on Friday morning, and many of them braced for chaos ahead. Several Afghan officials, often in the loop on security planning and decision-making, said they had received no indication in recent days that the Americans would pull troops out. The fear that Mr. Trump might take impulsive actions, however, often loomed in the background of discussions with the United States, they said.
They saw the abrupt decision as a further sign that voices from the ground were lacking in the debate over the war and that with Mr. Mattis’s resignation, Afghanistan had lost one of the last influential voices in Washington who channeled the reality of the conflict into the White House’s deliberations.
The reduction of American forces in Afghanistan, one American official said, is an effort to make Afghan forces more reliant on their own troops and not Western support.
But some fear the move could only imperil the Afghan troops, who have struggled in the field against the Taliban and have suffered high casualty rates, even with the current level of American support.
Cmdr. Rebecca Rebarich, a Pentagon spokeswoman, declined to comment on the plan to remove troops from Afghanistan.
The president long campaigned on bringing troops home, but in 2017, at the request of Mr. Mattis, he begrudgingly pledged an additional 4,000 troops to the Afghan campaign to try to hasten an end to the conflict.
Though Pentagon officials have said the influx of forces — coupled with a more aggressive air campaign — was helping the war effort, Afghan forces continued to take nearly unsustainable levels of casualties and lose ground to the Taliban.
The renewed American effort in 2017 was the first step in ensuring Afghan forces could become more independent without a set timeline for a withdrawal. But with plans to quickly reduce the number of American troops in the country, it is unclear if the Afghans can hold their own against an increasingly aggressive Taliban.
Currently, American airstrikes are at levels not seen since the height of the war, when tens of thousands of American troops were spread throughout the country. That air support, officials say, consists mostly of propping up Afghan troops while they try to hold territory from a resurgent Taliban.
Lt. Gen. Kenneth F. McKenzie Jr. of the Marines, the incoming commander of Central Command, told lawmakers during his confirmation hearings this month that the Afghan military would dissolve if not for American support.
“If we left precipitously right now, I do not believe they would be able to successfully defend their country,” he said. “I don’t know how long it’s going to take. I think that one of the things that would actually provide the most damage to them would be if we put a timeline on it and we said we were going out at a certain point in time.”
One silver lining that some saw in Trump’s decision to draw down troops from Afghanistan is that it could be coordinated with the peace talks as a trust-building measure. But many officials suggested that was unlikely, given the impulsive nature of the announcement and its timing.
On Thursday, before the pullout had been announced, Zalmay Khalilzad, the Trump administration’s special representative in charge of the talks for Afghan reconciliation, said he had made it clear to the Taliban that the United States was committed to Afghanistan.
“If they want to fight or continue fighting, we assured them that the United States will stand with the government and the people of Afghanistan,” he said.
When announcing a new Afghan strategy last year, Mr. Trump was critical of the Obama administration for openly signaling to the Taliban its plans for a drawdown. The military establishment welcomed an open-ended commitment based on conditions on the ground, although they remained wary of an impulsive president.
The plan to reduce American forces in the country comes just days after the United Arab Emirates hosted two days of talks between the United States and the Taliban. The Wall Street Journal was the first to report the decision to withdraw troops.
Mr. Khalilzad, in discussing progress in the negotiations, said the Taliban’s demand remained an agreement over the withdrawal of foreign forces from Afghanistan, while the United States has sought assurances from the militant group that Afghanistan would not become a haven for terrorists.
It remains unclear how the newly planned troop drawdown could affect the administration’s negotiations with the Taliban.
Besides the current contingent of roughly 14,000 American troops, there are also 8,000 NATO and allied troops deployed in Afghanistan tasked primarily with training and advising the Afghan forces.
If American troop levels drop to around 7,000, they will be at their lowest since March 2002, when the largest ground assault of the war at that time began during Operation Anaconda.
The American troops currently in Afghanistan are divided between training and advising Afghan forces and a counterterror mission against groups like the Islamic State and Al Qaeda. Those who are part of the 7,000-troop withdrawal will be a mixture of forces from both of those missions.
More than 2,400 Americans have died in Afghanistan since 2001, and this year 13 were killed in combat. Since the end of 2014, when the Pentagon declared an end to combat operations in the country, more than 25,000 Afghan soldiers and police have been killed.