CHART: How The U.S. Troop Levels In Afghanistan Have Changed Under Obama Once upon a time, President Obama said he wanted to pull almost all troops out of Afghanistan. That has proved way harder than he thought.

CHART: How The U.S. Troop Levels In Afghanistan Have Changed Under Obama

President Obama came into office pledging to end the U.S. military role in Afghanistan's war. But on Wednesday, the president announced there will still be around 8,400 American troops there when he leaves office in January, more than 15 years after America launched what's become the longest war in its history.

In his first few years in office, Obama dramatically ramped up the U.S. presence in Afghanistan, from a little over 30,000 to more than 100,000 troops at the peak in 2011.

The plan was to cripple the Taliban, train the Afghan military, stabilize government and then withdraw the U.S. forces by the time Obama's second term ended.

But a few things happened along the way.

Obama withdrew the final American combat troops from Iraq at the end of 2011, when that country was relatively stable. But the Iraqi fighting resumed as the Islamic State emerged as a potent force, and Obama sent American forces back into Iraq. About 5,000 Americans are now there, mostly training the Iraqis and working on the air campaign against ISIS.

The fear that the same thing could happen in Afghanistan has clouded plans for a complete American withdrawal in that country.

Obama's drawdown in Afghanistan initially proceeded as planned during his second term, and he announced an end to U.S. combat operations at the end of 2014.

The president said then about 10,000 troops would remain to train the Afghans, though they too would leave that country by the time Obama left the White House.

Obama projected that U.S. troops would only have a "normal embassy presence" in Kabul by the end of 2016. U.S. Marines guard American embassies around the world.

But the Taliban have proved stubbornly resilient, and the Obama timetable kept getting pushed back.

Obama announced last October he wanted to go down to 5,500 American personnel by the end of this year. But after consulting with the Pentagon, he decided to keep 8,400 there when he hands over to his successor in January.

Here's how that trend looks over time:

That dotted line shows what a drawdown to 5,500 would look like, compared to the newly-projected 8,400. In the grand scheme of troops in Afghanistan, it looks like a tiny blip.

But the Afghan military is still a work in progress and the Taliban are still strong, particularly in the south and east of the country. U.S. air support and training for Afghan troops is still considered critical.

While Americans are not supposed to be involved in combat, they occasionally are. Thirty-eight Americans, both military personnel and civilians, have been killed in Afghanistan over the past 18 months.

As a U.S. trainer recently told NPR's Tom Bowman, Afghan forces would struggle if the U.S. left.

In his announcement Wednesday, Obama said the remaining U.S. forces would be focusing on two things: "training and advising Afghan forces, and supporting counterterrorist operations."

In a June letter published in National Interest, the AP notes, ambassadors to and commanders in Afghanistan urged President Obama to keep troops at the current level of 9,800.

They argued that freezing troop levels would allow Obama's successor "to assess the situation for herself or himself and make further adjustments accordingly."

"If Afghanistan were to revert to the chaos of the 1990s, millions of refugees would again seek shelter in neighboring countries and overseas, dramatically intensifying the severe challenges already faced in Europe and beyond," they wrote.

And troop levels are just one barometer of the U.S. role, and not necessarily a good one, says one expert.

"By and large, even though it's quoted again and again and again, there's almost nothing more meaningless than the total number of people in uniform, unless you know exactly what they're doing," said Tony Cordesman, an expert on national security at the Center for Strategic and International Studies, a foreign policy think tank in Washington, D.C.

The important question, he said, is what those troops will be doing, and whether they can adequately train Afghan forces to handle counterterrorism operations.

In Cordesman's view, there's a problem with trying to project plans for withdrawal in the first place: namely, that people can't see the future.

"It wasn't clear how much progress the Afghan forces would make, and some of the estimates were far too optimistic," he said.