Out of Afghanistan? Not yet: Our view Obama's legacy has to take a back seat to facts on the ground.

The Editorial Board | USA Today

President Obama seems to want few things more when he leaves office than to have pulled virtually all U.S. troops out of Afghanistan. Many Americans agree; more than 40% now think the war, by far the longest in U.S. history, was a mistake to begin with.

The war wasn’t a mistake. U.S. forces had little choice about invading in 2001 to rout a Taliban government that gave Osama bin Laden's al-Qaeda terrorists haven to launch the 9/11 attacks on the United States. But after 14 years, an estimated $1 trillion and nearly 2,400 American lives, the war grinds on.

As tempting as it might be to declare victory and go home, pulling out before Afghan government forces can reliably stand and fight on their own would be a dangerous mistake. It would risk the same sort of unraveling that occurred after U.S. troops left Iraq in 2011, opening the way for the advance of the Islamic State, which now controls large swaths of Iraq and has as many as 3,000 adherents in Afghanistan.

Obama declared the U.S. combat role in Afghanistan over almost a year ago and ceded the lead to Afghan forces, but saying that the war was over didn’t make it so. Fresh evidence came last month when outnumbered Taliban forces managed to seize the northern provincial capital of Kunduz, raising serious doubts about the government troops' ability and willingness to fight effectively without U.S. help.

The Taliban's ability to seize a key provincial capital for the first time in the 14-year war was ominous. By comparison, in almost 30 years of fighting, the Vietcong and the North Vietnamese Army never managed to seize and hold a provincial capital in South Vietnam until four months before the fall of Saigon and the end of that war.

The difference here was that the Taliban couldn’t hold Kunduz. Afghan government forces retook it after a week, but only with American help, including airstrikes that included the horrific and mistaken U.S. attack on a Doctors Without Borders hospital.

It’s understandable that Obama wants out of Afghanistan, a war he inherited and promised to end. For years, the U.S. effort there was the neglected stepchild of a policy focused chiefly on Iraq. The Pentagon has struggled to find a way to beat back the tenacious insurgency in Afghanistan, including surging to a peak of 101,000 U.S. troops in the summer of 2011. Just 9,800 U.S. troops remain in the country, and Obama’s plan has been to shrink that to just 1,000 troops by late next year, chiefly to guard the U.S. Embassy in Kabul.

Recent developments, however, have unsettled the administration and provoked a welcome reassessment. Gen. John Campbell, the U.S. commander in Afghanistan, told a Senate committee last week that he would recommend that the president revise the troop drawdown plan, and Defense Secretary Ash Carter subsequently asked NATO allies to be flexible about their troop levels.

Leaving a significant troop presence in Afghanistan wasn't part of the legacy Obama envisioned when he vowed to end two wars. But legacy has to take a back seat to facts on the ground. Given the unraveling in Iraq and the recent gains by the Taliban, the U.S. can't leave Afghanistan yet.

USA TODAY's editorial opinions are decided by its Editorial Board, separate from the news staff. Most editorials are coupled with an opposing view — a unique USA TODAY feature.

To read more editorials, go to the Opinion front page or sign up for the daily Opinion e-mail newsletter.