Afghanistan's President Hamid Karzai speaks during a joint news conference with Pakistan's Prime Minister Nawaz Sharif (not pictured) in Kabul on Saturday. (MOHAMMAD ISMAIL/REUTERS)

In January, when U.S. officials first raised the prospect of keeping no troops in Afghanistan after 2014, this “zero option” was broadly seen as a rhetorical bargaining chip the White House was using to nudge along talks over a long-term security agreement.

But an increasingly acrimonious stalemate between the officials and Afghanistan's recalcitrant president has made the prospect quite real. After its longest war in history, the United States is suddenly contemplating having to dismantle the bulk of its counterterrorism infrastructure in the region and abandon Afghanistan’s fledgling security forces. A wholesale withdrawal would also shut down the ­foreign-aid pipeline that keeps the Afghan state afloat and sharply limit any enduring U.S. diplomatic presence.

The uncertainty over the long-term security deal — which President Hamid Karzai has threatened not to sign by the end of the year, as the United States has demanded — has the potential to be particularly damaging on the eve of Afghanistan’s presidential election, scheduled to take place next spring, U.S. officials say.

“If it doesn’t happen, if this anxiety grows, you project into the upcoming electoral period a degree of instability caused by growing alarm at Afghanistan returning to the 1990s,” said James F. Dobbins, the State Department’s special envoy to Afghanistan and Pakistan. “It’s every man for himself, where losers in the election don’t just go into the opposition but get killed or go into exile. It’s winner takes all.”

Tensions between Kabul and Washington intensified Friday when the U.S.-led military coalition acknowledged it had launched airstrikes the day before that killed a child and injured two women in southern Afghanistan. Karzai angrily billed the strike as further proof that the United States has little regard for the lives of Afghan civilians.

U.S. officials signaled last week they were reasonably optimistic that Karzai would soon relent and sign the bilateral security agreement, which sets the rules for an enduring U.S. military presence after the U.N. mandate that governs its role expires in December 2014. But after Thursday’s civilian casualties, Afghan officials said he was even more reluctant to sign the document promptly.

Officials at the Pentagon, who have come to see the public warnings of a zero option as counterproductive, said last week that the White House has not asked the Defense Department to draw up plans for a full withdrawal. In a statement, the Pentagon said in response to questions that the endorsement of a follow-on force by a gathering of tribal elders that Karzai convened in late November “indicates overwhelming support from the people of Afghanistan to continue the partnership that has brought us this far.”

U.S. military planners have been operating under the assumption that they would retain a force of between 8,000 and 12,000 U.S. and allied troops at bases in the capital and in the four corners of the country. Key among those would be U.S.-led hubs in the south and east. That presence would allow U.S. intelligence personnel and Special Operations forces to remain within easy striking distance of insurgent groups in the tribal area that straddles the border with Pakistan.

“The footprint of the intelligence community depends to some extent on the footprint of the military,” said a senior administration official who spoke on the condition of anonymity to discuss intelligence matters. “That is planning that will have to be done.”

Many of the groups that U.S. forces target in Afghanistan — most notably the Afghan Taliban — do not appear eager to attack Americans or U.S. interests outside the country. But Washington would like to maintain the ability to target al-Qaeda leaders in Pakistan and other groups that have plotted attacks on the West, including the Pakistani Taliban.

With no bases in Afghanistan, its ability to do so would be severely restricted. U.S. officials could try to carve out a hub in a Central Asian state north of Afghanistan. Alternatively, the United States could rely solely on Navy ships to launch strikes in the region.

“It would get longer, slower and harder,” said Linda Robinson, a RAND analyst who has spent time in recent years with U.S. Special Forces in Afghanistan.

In Iraq, the United States had to vastly downsize its diplomatic ambitions after it was unable to negotiate a similar troop agreement at the end of 2011. A senior State Department official said that keeping a large embassy in Kabul could likewise prove impossible if a deal is not reached.

“It could potentially mean no presence at all,” said the official, noting that the State Department has become more risk-averse after the fatal September 2012 attacks on U.S. compounds in Benghazi, Libya. “It would be hard to maintain an embassy in the absence of some international troop presence, given that our embassy has and continues to be heavily targeted.”

U.S. officials say that finalizing a deal soon is imperative to allow plans to be drawn up for the military campaign next year. A full exit would require a different set of priorities and more resources to fully dismantle all U.S. bases by the end of the year.

NATO allies that have pledged to keep troops in Afghanistan are also waiting for the U.S. deal to be signed because it will serve as a template for the one that would cover other coalition members, most of whom will not remain without a U.S. presence.

In a recent visit to Afghanistan, White House national security adviser Susan E. Rice warned Karzai in stern terms that the international aid his state depends on was contingent on his signing the deal by the end of the year.

Robinson, the RAND analyst, said it was a mistake for the White House to dangle the zero option because Karzai almost certainly interpreted it as an affront.

“It betrayed a fundamental misunderstanding of Afghan nationalism and pride,” she said. While Karzai is a “problematic” partner, Robinson said, U.S. officials would have been better off if they had managed to “craft this in a way in which his role as guardian of Afghan sovereignty is unimpeachable.”

Some U.S. officials argue that Karzai appears to be drawing the process out to bolster his legacy at the end of his mandate, operating under the assumption that the threats of a full pullout are empty ones.

“I don’t know if he fully realizes the risks,” Gen. Joseph E. Dunford Jr., the top U.S. commander in Afghanistan, told the Wall Street Journal last week. “He certainly understands it from an Afghan perspective. I don’t know if he fully appreciates what the implications are for the United States.”

Robinson said Karzai’s political calculus could turn out to be wrong.

“I think the administration has very limited appetite for this,” she said. “He could be stepping off the cliff.”