Barack Obama wanted to be the president who brought all U.S. troops home under his watch. But his legacy considerations have taken a back seat to increasingly troubled realities in Afghanistan.

The announcement Thursday that the 9,800 U.S. troops in Afghanistan would remain there into much of next year, and about 5,000 will stay in 2017, reflected the White House’s growing concerns about the resilience and ferocity of the Taliban insurgency. Despite blows to its operational capacities, organizational infighting, and a leadership crisis, the Taliban has dialed up its offensive. There have been more civilian casualties and internal displacements in Afghanistan in 2015 than in any year since 2001. The Taliban’s presence is larger than at any other time of the insurgency. Its recent–if brief–takeover of the major city of Kunduz and subsequent seizure of several districts in nearby provinces underscore how the Taliban remains a formidable opponent that Afghanistan’s fledgling forces can’t handle on their own.

Meanwhile, disaffected Taliban militants, mainly in the eastern province of Nangarhar, have thrown their allegiances to Islamic State. ISIS formally announced its expansion into Afghanistan early this year. While its extremists are not in a position to take hold of swaths of Afghanistan as they have done in Iraq and Syria, the group has developed a profile nonetheless.

Still, Mr. Obama’s decision gives the U.S. military more time to help Afghan forces address capacity gaps in intelligence collection, logistics, air cover, and other areas of weakness.

Another factor driving Mr. Obama’s policy shift is personal. Despite the struggles of his government, Afghan President Ashraf Ghani is a man with whom Mr. Obama can do business. Unlike his predecessor, Hamid Karzai, who got into shouting matches with U.S. officials during his last years in office, Mr. Ghani has a warm relationship with Washington.

Of course, this new troop plan won’t magically stabilize Afghanistan in a big way. One hundred thousand troops couldn’t end the insurgency in 2011; fewer than 10,000 won’t do so in 2016.

Still, Mr. Obama’s decision gives the U.S. military more time to help Afghan forces address capacity gaps in intelligence collection, logistics, air cover, and other areas of weakness.

An extended U.S. military presence will help Afghan forces undertake counterterrorism operations. Given the resurgent Taliban and an emerging ISIS threat, Afghan forces need all the help they can get. U.S. troops can provide assistance, much as they did in the recovery of Kunduz—an operation that may have had a much less happy ending were it not for U.S. involvement. The U.S. troops are to stay on bases in two key locations: One is in Kandahar, the Taliban’s traditional stronghold; the other is in Jalalabad, an area where the largest group of ISIS-aligned militants are based.

In addition to bolstering the readiness of Afghan security forces, an extended U.S. troop presence is likely to be a big psychological boost for Afghans. Their troops’ morale levels, already low in recent months, tumbled after the seizure of Kunduz. Knowing that the U.S. military will not be abandoning them anytime soon is likely to be a big pick-me-up.

 

The opinions expressed here are those solely of the author.

This article was originally published in the Wall Street Journal's Washington Wire.