The longest war in American history drags on, with Washington a captive of purposeless inertia. The Obama administration should bring all U.S. forces home from Afghanistan and turn the conflict over to the Afghans.

After Afghan-based terrorists orchestrated the 9/11 terrorist attacks, Washington invaded the Central Asian nation. The Bush administration had little choice but to make an example of the Taliban regime as well as target al-Qaida.

But the lesson that governments which allow terrorist attacks on America lose power was delivered 12 long years ago. The Bush administration soon switched to nation-building in Central Asia.

President Barack Obama then made the war his own, twice increasing the number of troops. Still, he promised that U.S. forces would return home. Last year Vice President Joe Biden stated simply: “We are leaving in 2014. Period.”

But now the administration wants to keep between 8,000 and 15,000 troops on station for years – if not forever. The newly negotiated Bilateral Security Agreement would run until “the end of 2024 and beyond.”

Why? Afghanistan never was vital to America. Not even during the Cold War, when after the Soviet invasion in December 1979 the conflict offered a convenient and inexpensive (for Washington, not the Afghan people) opportunity to bleed Moscow dry.

Osama bin Laden again focused U.S. attention on Afghanistan, but only the transitory terrorist connection made control of Kabul critical. Observed Biden: “We went there for one reason: to get those people who killed Americans, al-Qaida.” So what is Washington doing there today? A mix of nation-building, democracy-promotion and humanitarian intervention.

However, if the Afghan political system is not stable after years of allied military and financial support, the few thousand personnel the Obama administration hopes to keep in country won’t make much difference. Afghanistan has been ravaged by decades of conflict.

When I visited Afghanistan in 2010 and 2011, allied commanders and officials routinely justified the Western presence as being necessary to prevent an al-Qaida revival. However, terrorists don’t need to locate in Afghanistan when they can operate in Pakistan and many other nations.

Three years ago CIA Director Leon Panetta concluded: “At most, we’re looking at 50 to 100, maybe less” al-Qaida fighters in Afghanistan. Al-Qaida affiliates seem to be far more active in Yemen, Syria and increasingly Iraq than in Afghanistan.

The strongest argument against the “zero option” of no troops is that it would limit Washington’s capability to strike elsewhere, most notably in Pakistan. However, the thousands of military personnel, servicing a complex of bases, communications facilities, airfields and out-size embassy, look more configured to act in the civil war that is likely to continue.

Further, the larger the projected presence, the greater the target for terrorists, insurgents and other malcontents. Better a much smaller counter-terrorist operation. Better still would be moving any operations off-shore, as with Yemen.

Washington should scale back its drone operations in Pakistan and elsewhere. So-called “signature” strikes, in which most anyone in proximity to suspected terrorists is viewed as a likely terrorist, undoubtedly kill locals who threaten no one. Further, the U.S. began targeting the Pakistan Taliban apparently on the rationalization that militants might threaten Americans in Pakistan. Unfortunately, blowback when the Taliban began targeting Americans was inevitable.

Now, however, President Hamid Karzai says he does not want to sign the Bilateral Security Agreement until after April’s presidential election. Some suspect that Karzai is primarily engaged in extortion, having explained: “We want the Americans to respect our sovereignty and be an honest partner. And bring a lot of money.”

His chutzpah is in America’s interest. Because of him, U.S. troops actually might leave Central Asia – as they should.

Americans have been fighting in Afghanistan for longer than the Civil War, World War I and World War II combined. It’s time to go home.

Doug Bandow is a senior fellow at the Cato Institute and a former special assistant to President Ronald Reagan.