President Obama, elected to the White House seven years ago in part with a pledge to pull back on America's protracted presence in Afghanistan, said Thursday that changing circumstances on the ground there required U.S. troops to remain beyond his presidency.
"While America's combat mission in Afghanistan may be over, our commitment to Afghanistan and its people endures," Obama said.
He added: "It's the right thing to do."
Thursday's announcement marked an abrupt about-face from a plan he outlined last year, in which he envisioned keeping only a security force of 1,000 at the U.S. embassy in Kabul.
Instead, Obama said the 9,800 U.S. troops currently in Afghanistan would stay through most of 2016, and then be reduced to 5,500 troops working out of military bases in Bagram, Jalalabad and Kandahar.
The announcement, made in a national televised address, followed a months-long review of America's battle against the Taliban, which was launched after the 9/11 terror attacks by Obama's predecessor, former president George W. Bush, and continues to rage.
Obama said the situation in Afghanistan — the inability of local security forces to defend themselves, new aggression by the Taliban, efforts by ISIS to move into the country — was "still very fragile, and in some places there is a risk of deterioration."
The Taliban's efforts to retake territory includes an assault on the city of Kunduz last month that prompted U.S. airstrikes which mistakenly destroyed a Doctors Without Borders hospital.
"Taliban advances in parts of the country underscore the reality that this is and remains a difficult fight," Defense Secretary Ash Carter told reporters Thursday afternoon.
The United States also wants to avoid a repeat of what happened in Iraq following a reduction of American troops there: political chaos, more fighting, and the growth of ISIS. The turmoil forced Obama to return troops there.
"As commander in chief, I will not allow Afghanistan to be used as safe haven for terrorists to attack our nation again," Obama said.
Carter described the change in plan as "a chance to finish to what we started."
Obama's decision ensures that both wars — the fight against ISIS in Iraq and Syria and the fight in Afghanistan — will likely be inherited by his successor.
House Majority Leader Kevin McCarthy said Obama "made the right decision" but quibbled with the speed of the drawdown. He called the 5,500 figure "arbitrary," arguing that the troop level should remain the same through the remainder of Obama's term.
Jens Stoltenberg, secretary general of NATO, said in a statement that he welcomed Obama's announcement, saying it would allow the alliance's partners to remain in Afghanistan as well. The current NATO mission, Resolute Support, includes some 6,000-plus troops from 41 member nations aside from the U.S. force.
The president stressed that the United States sees Afghan President Ashraf Ghani as a committed and able partner. His predecessor, Hamid Karzai, who left office last year, was not viewed as favorably.
Since the start of the war in Afghanistan in October 2001, 2,345 American military personnel have been killed in action there and another 20,071 have been wounded.
Obama said those numbers weighed on him.
"My fellow Americans, after so many years of war, Afghanistan will not be a perfect place. It's a poor country that will have to work hard on development. There will continue to be contested areas," he said. "But Afghans like these are standing up for their country. If they were to fail it would endanger the security of us all."
Administration officials have said the larger contingent of troops would have a "limited mission": counterterrorism activities against al Qaeda and its affiliates and training Afghan personnel. The revised plan would cost $14.6 billion, about 4.6 billion more than the Kabul-only deployment, officials said.
As Obama turned to leave the podium, a reporter asked if the decision was disappointing to him.
He said it wasn't.
"As I've continually said, my approach is to assess the situation on the ground, figure out what's working and what's not working, and make adjustments as necessary," Obama said. "This is not the first time adjustments have been made, and it probably won't be the last."