As the military effort is reduced, a US diplomatic push to stop the drift to an ever wider civil war is vital. Far from being over, the US commitment to the region must now be even more intense.
Diplomacy can avert an even more pointless Afghan war
In announcing the endgame for the Afghanistan war on Wednesday evening, Barack Obama at last sounded like a man whose heart was in his words. During his campaign for office in 2008, he stumped on the promise of an aggressive campaign in Afghanistan and across the border in Pakistan, but his instincts as president have always been to put an end to both of George W Bush's wars.
As he prepares for re-election in just over a year, Mr Obama is no longer afraid of being seen as weak on national security. The tide of events is for once running in his favour. The killing of bin Laden had zero effect on the Afghan war but it was a game-changer in US public opinion, and polls for the first time show a majority of Americans want to get out of Afghanistan.
Even among Republican contenders for the presidency the mood is changing. The isolationist and budget-cutting genes in the Republican make-up are starting to trump the strong defence gene.
The generals are not happy that the president is ordering a withdrawal of 33,000 troops by next summer, thus hamstringing the US military for the 2012 fighting season. By imposing the supremacy of politics over the military, the president is taking a huge risk, they say. He is undermining the military's tactical successes in the south at a time when drone strikes are killing more and more Taliban leaders.
The psychological effect of the announcement will, they argue, be even greater than the material effect. Every ally of Hamid Karzai, the Afghan president, will now cosy up to the Taliban, seeing them as the force of the future.
Militaries all over the world will always find arguments for more troops and more time to win, and sometimes these arguments are justified. But the US generals have had a decade to fight this war, and their time is running out.
One is entitled to ask, if the US military understands Afghanistan so well, how come they did not see the resurgence of the Taliban back in 2002? Every observer can see that the US military advances reflect not defeat by the Taliban but a decision to withdraw from a fight against a superior enemy.
While these advances are trumpeted, the Taliban quietly move into the north of the country, areas previously considered government-controlled. After a decade of mainly optimistic talk of victory, the military have lost their audience.
The president is doing the right thing in stopping troop reinforcements in a losing war. But his speech is only the start of a complex process, and so far it raises more questions than it answers.
Richard Holbrooke, the US special representative for Afghanistan and Pakistan who died suddenly last year, used to say that America was "fighting the wrong war in the wrong country". Pakistan, not Afghanistan, was the source of potential threats to US security. The discovery of bin Laden living under the nose of the Pakistani military only underlined the truth of the statement.
The US now recognises that it allowed its 2001 punitive expedition against bin Laden and his Taliban hosts to escalate into a hopeless nation-building exercise in Afghanistan, a country of little consequence. This had the unintended consequence of destabilising Pakistan, perhaps terminally. The US military is not responsible for this blunder. The blame lies with the politicians.
The Holbrooke view is now taking hold, and it is a tragedy that the man who brought peace to Bosnia in the 1990s is not around to pick up the baton.
With Washington dialling down its military role, the focus will be on Afghanistan's neighbours and the regional powers - Pakistan, India, China, Russia, Iran and Saudi Arabia. All these countries have their own interests in Afghanistan, and some have long-standing proxies - Pakistan with the Taliban, Russia and India with the old Northern Alliance and Iran with the Hazaras. Without a massive diplomatic push, a civil war of far greater ferocity than the current conflict is one possible outcome.
Mr Obama was clear on Pakistan: the US will never tolerate a safe haven for terrorists there. But it is not clear how the US "outreach" to the Taliban will fit with the United States' interests in Pakistan. As relations between Washington and Islamabad deteriorate, the Pentagon will want a base to keep an eye on, and operate against, the jihadists there. That base cannot be in Pakistan. It has to be over the border in Afghanistan, and will be a spur for continuing Taliban attacks.
Talking to the Taliban is a good idea. But it would have been even better in 2001, after they were driven out of Kabul. At this late stage, it is hard to see what real progress can be achieved: the Taliban know that the US is heading for the exit, and they can wait the Americans out. In the current state of relations with Pakistan, it is hard to imagine the Pakistani military exercising a moderating influence on them.
As for the Afghans who have relied on the US to stabilise their country, they will see this announcement as a second abandonment by the Americans. The US lost interest in their country - having showered guns and money on the warlords for years - when the Russians pulled out and their proxy government collapsed in 1992. Other US allies in the region, having seen Washington drop Hosni Mubarak, the Egyptian leader, will wonder how secure a patron Mr Obama is.
Someone must hold the ring among the regional powers, and only the US can do that. As the military effort is reduced, a US diplomatic push to stop the drift to an ever wider civil war is vital. Far from being over, the US commitment to the region must now be even more intense.