So long, Afghanistan?

President Hamid Karzai's erratic behavior has President Barack Obama considering a complete withdrawal of U.S. troops from Afghanistan after 2014.

The frustration with Karzai is understandable.

Last month, peace talks between the U.S. and the Taliban collapsed before they even started. Karzai accused the U.S. of trying to negotiate a separate peace with the Taliban and their enablers in Pakistan, leaving his government vulnerable to its foes. In retaliation, Karzai cut off negotiations with the U.S. over a security agreement that will govern American military forces after 2014.

And so, the White House signaled through a New York Times story this week, the so-called "zero option" is gaining traction.

The U.S. recently turned over complete security control to Afghanistan forces and has a timetable for withdrawal of troops by the end of 2014. The expectation is that the U.S. would keep a modest force of 3,000 to 9,000 troops after that, focused on anti-terror operations and support for Afghan security forces. Afghanistan will need international assistance to keep the Taliban at bay and deny a safe haven to al-Qaida.

But the U.S. won't be willing to risk an extended presence if it doesn't have an agreement with Afghanistan that legally protects U.S. soldiers. Without that agreement, the U.S. military will have to leave the country.

That's what happened in Iraq in 2011. Iraqi lawmakers refused to provide U.S. troops with legal protection from Iraqi courts. American soldiers would have been vulnerable to arrest and punishment under Iraqi laws. The U.S. wouldn't take that risk in Iraq, nor should it in Afghanistan.

Most likely, Obama has floated the zero option as a reminder (read: threat) to Karzai that he has an option: Embrace an international security presence beyond 2014 or watch his government fall to the Taliban.

After so many years of fighting, it's easy to lose sight of just how much life has improved in Afghanistan.

One snapshot: There are more than 8 million children in Afghanistan's schools now, including 2.6 million girls. In 2001, under Taliban rule, there were 900,000 boys and virtually no girls in school.

The U.S. and its allies have pledged to spend billions of dollars after 2014 to continue building Afghanistan's security forces. In a 2012 NATO summit in Chicago, world leaders declared that "Afghanistan will not stand alone" after 2014.