Recently, Afghan President Hamid Karzai and U.S. Secretary of State John Kerry announced that they had agreed on key provisions of a security arrangement that could allow some American forces in Afghanistan to remain after the NATO combat mission ends at the end of 2014. Yet no details were released on the deal, and remaining US troops immunity from the indigenous justice systemwhich also led to the scuttling of a significant residual presence of American forces in Iraqappears to be the sticking point. Earlier this issue had seemed to be resolved and the remaining issues were Afghan demands that the United States pledge to defend Afghanistan as it would a NATO ally and an Afghan desire to prohibit US Special Operations forces from continuing raids on Afghan villages.

The demand of the United States to try any misbehavior of American troops in the US, rather than the Afghan, justice system is a rather imperial one, but apparently nonnegotiable with the Americansat least if the outcome in Iraq is any indication. Although it is unclear how the other two issues were resolved (or whether they really are), the United States signing up to defend yet another countryespecially one as destitute and incapable of providing it any help as Afghanistanwould be a continuing monetary sinkhole in a time of a staggering US debt. Even more important, it might eventually involve heavier US attacks into Pakistan, a nominal US ally that is providing support for the US and Afghan enemythe Afghan Taliban. Finally, if US Special Operation raids on the few suspected al Qaeda targets remaining in Afghanistan were prohibited, the only remotely justifiable reason for leaving American troops in the country would be gone. (The other remaining mission of training Afghan security forces provides little benefit to US security.)

Long ago, US commanders had said the Afghan War was unwinnable on the battlefield and that a negotiated settlement was required. The problem is, because of plummeting support for the war at home, President Barack Obama pledged to withdraw US forces by the end of 2014. As the British learned in Yemen during the 1960s, when the occupying power announces when it is exiting, guerrillas just stay in the field and wait for the stronger partys departure. In other words, the Taliban has no incentive to negotiate for lesser results when they can get most of what they want just by waiting. Also, many Afghans, knowing that the Taliban will remain long after US forces withdraw, will begin cooperating with the insurgents even though some may not want to.

Obamas dilemma shows that guerrilla wars are difficult for democracies to win, because they are often protracted and the key center of gravity is at home rather than in the occupied country (the same was true in the Vietnam War). One lesson is that if you are in one, dont announce when you are leaving even if you are. The more important lesson is to be very wary of getting into such brushfire wars in the first place, because they are likely bogs.

According to US intelligence, Al Qaeda in Afghanistan/Pakistan is no longer even the biggest al Qaeda threat to the United States. Keeping troops in Afghanistan to battle roughly 50 suspected terrorists is needless. The real reason that the United States wants to retain some forces in Afghanistan is to protect the capital and keep the Taliban from taking that symbolic location. Many Afghans fear that upon US withdrawal, the Kabul government could disintegrate and civil war could resume. In fact, the few thousand US troops that would remain under any deal likely would be in the middle of a more intense civil war than what already has occurred for the last 13 years. The necessity of their mission for US security is highly questionable and their protection would be in problematical.

Lastly, proponents of retaining US forces say that if all US forces are removed from Afghanistan, Congress will be far less likely to keep providing the $4 to $6 billion per year needed to prop the rickety Afghan security forces, which have already proven a sinkhole for $40 billion in wasted US aid. (In Vietnam War, the Congress cut off US aid to the South Vietnamese government after US forces withdrew.) Yet saving this ineffectual expenditure would not be a bad outcome.

US commanders have maintained that Afghan forces have held their own against the Taliban, even though they took heavy casualties. But in guerrilla warfare, if the insurgents are not losing they are winning by just keeping an army in the field, and the rebels will likely do much better when the Americans leave, even according to US government officials.

So the United States should use any Afghan claims of sovereignty in the negotiation over any remaining US military presence to simply walk away with its troops and cash, thus cutting its losses and ending a quagmire that was lost long ago.

Ivan Eland is Senior Fellow and Director of the Center on Peace & Liberty at the Independent Institute. Dr. Eland is a graduate of Iowa State University and received an M.B.A. in applied economics and Ph.D. in national security policy from George Washington University. He spent 15 years working for Congress on national security issues, including stints as an investigator for the House Foreign Affairs Committee and Principal Defense Analyst at the Congressional Budget Office.