When Hamid Karzai, the Afghan president, was preparing for his visit to the White House today, it was clear that the meeting would not be an ordinary one. This is the week when the endgame for America's 11-year war in Afghanistan is being decided.
The negotiation started off as a numbers game. A year ago, Washington was talking about keeping a residual force of up to 35,000 in Afghanistan, after combat troops withdraw next year. To Mr Karzai, this seemed like a comfortable safety net, enough Americans to train the Afghan National Army (ANA) and to provide intelligence support, medical evacuation teams and ground-attack capability in case ANA morale faltered.
As the talks drew closer, it became clear that the US military was thinking of a much smaller footprint - between 6,000 and 20,000. Suddenly, as the Obama administration clarified its priorities for its second term, newspapers revealed that the residual presence was going to be cut back further, to as few as 3,000.
Finally, on the eve of the Afghan leader's arrival, the White House made it clear it was considering the "zero option": after more than 2,000 American dead and billions of dollars spent to prop up President Karzai as a bulwark against the Taliban, the US military was ready to just pack up and go at the end of 2014, as it has done in Iraq.
Floating the zero option was seen as a warning to Mr Karzai not to overplay his hand. His failure to get a grip on corruption or establish democratic legitimacy has eaten away at his support in Washington. If he wants a praetorian guard of US troops to remain, then he will have to grant them immunity from prosecution in Afghan courts. But immunity is not an easy issue for Mr Karzai, already accused by his enemies of being a lackey of Uncle Sam.
Given the poor state of the ANA - according to the Pentagon, only one of its 23 brigades can operate independently - it seemed unthinkable that the Americans would actually pull out at the end of 2014. But in fact that outcome, while not desirable, is far from unthinkable.
President Barack Obama's foreign policy is going to be judged on how he extricates the US from Afghanistan. His choice of new leaders for his national security team shows that "boots on the ground" in the Middle East and South Asia are yesterday's options.
Chuck Hagel, Mr Obama's nominee for defence secretary, is a wounded Vietnam veteran who has stood against the neoconservative agenda. He has spoken out against the US being goaded into war with Iran to suit the interests of the Israeli prime minister, Benjamin Netanyahu. Initially a supporter of the Iraq war, Mr Hagel later became a vociferous critic.
His main task will be to cut Pentagon spending. In 2011 the US spent $718 billion (Dh2.6 trillion) on defence and international security assistance, including the Iraq and Afghanistan wars.
By a rough calculation, it costs $1 million a year to keep a soldier in Afghanistan. So the current troop strength of 66,000 costs about $66 billion a year, which is not small change. The smaller the force, the higher the cost per soldier, so budget logic calls for a drastic cut.
But in the absence of US troops, who will prevent Afghanistan once again becoming a safe haven for Al Qaeda? The answer lies with Mr Obama's choice for head of the CIA: John Brennan, who as his counter-terrorism adviser has been responsible for the "drone war" against militants on the Afghan-Pakistan border and increasingly in Yemen. Yemen has in recent years been the source of more anti-US threats than Afghanistan, yet Mr Obama has left it in the hands of the CIA and its drones.
Mr Brennan's elevation is a clear endorsement of aggressive intelligence warfare. Is it possible to imagine that Mr Obama would entrust the CIA with what was the key goal of the Afghan invasion - to prevent Afghanistan becoming a place where jihadist plotters could operate undisturbed? Not entirely.
The US debate on Afghanistan focuses almost exclusively on soldiery, because the Pentagon has run the campaign since the outset. This is the clearest reason why it has been such a failure - the sin of generals being to promise that victory is always around the corner even when "victory" is an impossible concept.
The real issue is not the numbers game. The real issue is whether Afghanistan will have a leader next year who will be strong enough to keep the Taliban at bay, or co-opt them or somehow share power with them.
That leader will not be Mr Karzai: having served two full terms he is not eligible to stand for a third term in the 2014 elections.
But he will have a strong say in promoting a successor, and it is up to him, in the months that remain, to prepare for a clean election next year.
As the Pakistani author Ahmed Rashid has said, "Afghanistan needs a safe and secure political transition from Mr Karzai to the next man and from dependency on the West to greater self-reliance".
To imagine this happening requires a leap of faith - that Mr Karzai will rise to the challenge of crafting a lasting legacy; that talks involving Kabul, the Taliban and the Americans will bear fruit; and that the Pakistani military will decide that its interests would now be served best by a peace agreement rather than by an endless Taliban insurrection.
Two years may be too short a time for all this to fall into place. The work should have begun years ago, and should not have depended on the US electoral timetable.
But it is clear that the presence of foreign soldiers has never sat well with the Afghan desire for independence. Once the troops are gone - or at least less visible - western powers can support the new regime in Kabul with money and other means. It is now up to Mr Obama to decide whether he can go with his instinct, that foreign policy should not be left to the generals.
On Twitter: @aphilps