WASHINGTON, Oct 15 — The United States will halt its military withdrawal from Afghanistan and instead keep thousands of troops in the country through the end of his term in 2017, President Obama announced on Thursday, prolonging the American role in a war that has now stretched on for 14 years.
In a brief statement from the Roosevelt Room in the White House, Mr. Obama said he did not support the idea of “endless war” but was convinced that a prolonged American presence in Afghanistan was vital to that country’s future and to the national security of the United States.
“While America’s combat mission in Afghanistan may be over, our commitment to Afghanistan and its people endures,” said Mr. Obama, flanked by Vice President Joseph R. Biden Jr. and his top military leaders. “I will not allow Afghanistan to be used as safe haven for terrorists to attack our nation again.”
The current American force in Afghanistan of 9,800 troops will remain in place through most of 2016 under the administration’s revised plans, before dropping to about 5,500 at the end of next year or in early 2017, Mr. Obama said. He called it a “modest but meaningful expansion of our presence” in that country.
The president, who has long sought to end America’s two wars before he leaves office, said he was not disappointed by the decision. He said the administration had always understood the potential for adjustments in troop levels even as the military sought to withdraw troops from battle.
But the announcement underscores the difficulty Mr. Obama has had in achieving one of the central promises of his presidency in both Afghanistan and Iraq. Mr. Obama conceded that despite more than a decade of fighting and training, Afghan forces are not fully up to the task of protecting their country.
The Taliban are now spread through more parts of the country than at any point since 2001, according to the United Nations, and last month they scored their biggest victory of the war, seizing the northern city of Kunduz and holding it for more than two weeks before pulling back on Tuesday.
Mr. Obama noted the dangers, saying, “In key areas of the country, the security situation is still very fragile, and in some areas, there is risk of deterioration.” After 2017, he said, American forces will remain in several bases in the country to “give us the presence and the reach our forces require to achieve their mission.”
He did not specifically mention Iraq, where a full troop withdrawal has been followed by a surge in violence from the Islamic State. But he said the mission in Afghanistan had the benefit of a clear objective, a supportive government and legal agreements that protect American forces — three factors not present in Iraq.
“Every single day, Afghan forces are out there fighting and dying to protect their country. They’re not looking for us to do it for them,” Mr. Obama said. He added, “If they were to fail, it would endanger the security of us all.”
After the president’s remarks, White House officials reiterated to reporters that the missions of American soldiers in Afghanistan would not change. Some of the troops will continue to train and advise Afghan forces, while others will carry on the search for Qaeda fighters, militants from the Islamic State and other groups that have found a haven in Afghanistan.
Josh Earnest, the White House press secretary, said politics played “absolutely no role” in the president’s decision to extend the American military presence in Afghanistan.
But Mr. Earnest acknowledged the 2016 presidential election, saying that the next president — Democrat or Republican — will inherit a situation in the country that is a “dramatically improved one when compared to the situation that President Obama inherited.”
Some critics of the administration, who have long urged the president to leave more troops in Afghanistan, said Mr. Obama’s actions did not go far enough to confront Al Qaeda and other threats there.
“While this new plan avoids a disaster, it is certainly not a plan for success,” Representative Mac Thornberry, a Texas Republican and chairman of the House Armed Services Committee, said in a statement.
House Speaker John A. Boehner said in a separate statement that he was “glad the administration finally admits President Obama’s arbitrary political deadlines are ‘self-defeating.’ ” He added: “The president’s half-measures and failed leadership have emboldened our enemies and allowed for ISIL’s rise. It’s time for a change.”
Even before Kunduz fell to the Taliban, the administration had been under growing pressure from the military and others in Washington, including Congress, to abandon plans that would have cut by about half the number of troops in Afghanistan next year, and then drop the American force to about 1,000 troops based only at the embassy in Kabul by the start of 2017.
Obama’s Evolving Stance on Afghanistan
Important speeches illustrate President Obama’s shifting stance on keeping troops in Afghanistan, beginning with his days as a senator.
Now, instead of falling back to the American Embassy — a heavily fortified compound in the center of Kabul — Mr. Obama said that the military would be able to maintain its operations at Bagram Air Field to the north of Kabul, the main American hub in Afghanistan, and at bases outside Kandahar in the country’s south and Jalalabad in the east.
All three bases are crucial for counterterrorism operations and for flying drones that are used by the military and the C.I.A., which had also argued for keeping troops in Afghanistan to help protect its own assets.
There was no set date for the military to decrease the number of troops in Afghanistan to 5,500. The pace of that troop reduction would be determined largely by commanders on the ground, and the timing would also most likely provide flexibility to whoever succeeds Mr. Obama.
President Ashraf Ghani of Afghanistan had also pressed for Mr. Obama to keep more troops, and many in Washington who have worked closely with the Afghans over the past several years were loath for the United States to pull back just when it had an Afghan leader who has proved to be a willing partner, unlike his predecessor, Hamid Karzai.
Mr. Ghani is acutely aware of his country’s need for help from the United States and its NATO allies. The American military has repeatedly stepped in this year to aid Afghan forces battling the Taliban, launching airstrikes and at times sending Special Operations troops to join the fight, despite Mr. Obama’s declaration that the American war in Afghanistan had ended.
But the recent fighting in Kunduz also exposed the limits of foreign forces now in Afghanistan, which total 17,000, including American and NATO troops. It took only a few hundred Taliban members to chase thousands of Afghan soldiers and police officers from Kunduz, and the Afghans struggled to take back the city even with help from American airstrikes and Special Operations forces.
During the fighting, an American AC-130 gunship badly damaged a hospital run by Doctors Without Borders, killing at least 22 patients and staff members — and not a single insurgent.
Mr. Obama apologized for the attack, which may have violated guidelines laid down by the administration for the use of force by the military after the American combat mission ended last year. Under the rules, airstrikes are authorized to kill terrorists, protect American troops and help Afghans who request support in battles — like those in Kunduz, recently taken over by the Taliban — that can change the military landscape.
The idea behind the guidelines was to give troops leeway and to keep Americans out of daily, open-ended combat. But how much latitude Mr. Obama would allow the military moving forward was unclear.
It is not the first time the administration has revised the withdrawal plans. During Mr. Ghani’s visit in March, Mr. Obama announced that the United States would keep 9,800 troops in Afghanistan through 2015, instead of cutting the force in half, as had been originally planned. At the time, the White House still maintained that almost all the troops would be pulled out by 2017.
But with the situation in Afghanistan continuing to deteriorate, the military presented the administration with new options this summer. The plan that has been decided on for 2017 and beyond hewed closely to a proposal made by Gen. Martin E. Dempsey, then the chairman of the Joint Chiefs of Staff.
Mr. Obama said that 5,500 troops, along with contributions from NATO allies, which have yet to be agreed upon, would provide enough power to protect the force and continue the advisory and counterterrorism missions.
His announcement will allow the military to continue carrying out secret operations against suspected militant leaders focused primarily in eastern Afghanistan. In recent years, the United States shifted away from counterinsurgency operations that involved tens of thousands of troops patrolling the countryside and toward a so-called “lighter footprint” model of targeted strikes.
New details about such operations were disclosed on Thursday in classified documents published by The Intercept, a national security news website. The documents – part of a larger group of military files providing details about the Pentagon’s drone war from 2011 to early 2013 – included a set of briefing slides assessing Operation Haymaker, an effort to hunt down Taliban and Qaeda militants in Afghanistan from January 2012 to February 2013.
During that period, there were 56 airstrikes that killed 35 suspected militants who the military had been tracking. Those strikes also killed 219 other people who do not appear to have been specifically targeted but were labeled “enemy killed in action,” the documents showed.