We are badly served by history books when it comes to wars. They give us a start date and an end date but these neat divisions never tell the full truth.
The Second World War - always defined as 1939-45 - dragged on in Greece, in a civil war, until 1949. By that time the victorious Allied powers had fallen out, leading to the Cold War which carried on until the 1980s.
If you step back far enough, most of the 20th century is one long confrontation involving the European powers, Russia and the US.
So what are we to make of US President Barack Obama declaring that the decade-long war in Afghanistan is on course to end in 2014, when the bulk of the US and allied forces withdraw? By any standards this is hostage to fortune. In Afghanistan, more than anywhere else, the most significant events happen between the wars, or rather when the outside powers have stopped paying attention.
The disastrous Soviet invasion of Afghanistan, which ended with withdrawal of Soviet troops in 1989, ushered in an era when both major powers, the US and Russia, ignored the place. That period saw the destruction of the capital, Kabul, in a civil war between mujahideen factions, the rise of the Taliban and then the arrival of Osama bin Laden to use the country as a base for global jihad. The lesson is that the retreat of a superpower is not the end of the problem, but the time of greatest danger.
Mr Obama's current term in office seems defined by Afghanistan. In the famous pictures of him in the White House Situation Room during the last year's raid against bin Laden's hideout in Pakistan, he looks genuinely anguished. He knows he is just two crashed helicopters away from a Jimmy Carter-style debacle. This is a man who has never commanded soldiers, taking the biggest risk of his life.
But look at him now, speaking from Bagram Air Base on Wednesday. Boosted by the death of bin Laden, he can use a Churchillian phrase and talk of "finishing the job" in Afghanistan. He can state confidently that the US is seeking a negotiated settlement with the Taliban, burying the Bush-era rhetoric of "smoking them out of the caves".
The Strategic Partnership Agreement he signed with Afghan President Hamid Karzai is surely more grandly titled than its content - so far undisclosed - merits. But its purpose is clear. It sends a signal to Afghanistan's neighbours that the US is not intending to repeat the mistake of 1989, when it forgot about the country after the Soviets retreated. If this document means anything, it means that the withdrawal of US forces will not mean a rush for the last helicopter from the roof of the US embassy.
If there is to be any chance of peace, the regional powers have to be convinced that 2014 will not signal the flight of the current ruling elite, or the start of another, harsher round of civil war. They want to know what is going to happen to the impossibly large Afghan National Army which is being built up to 352,000 men, and which can only be paid for by foreign support.
After 2014, will hundreds of thousands of armed and trained men be demobilised and left without a job and, as happened in Iraq, seek out the highest foreign bidder? The Americans are not going to foot the bill to keep these soldiers in employment, but they are committed to twisting the arms of the Europeans and others to stump up real cash, rather than the usual empty promises made at international conferences.
This is a good start, but there are far too many weaknesses, some of them potentially fatal.
The engagement with the regional powers needs to be far deeper. Whether Washington likes it or not, Iran is a neighbour of Afghanistan and host to at least one million Afghan refugees. It must be a full member of any regional forum, however distasteful to the US.
As for Pakistan, relations with the US have deteriorated so far that, according to Anthony Cordesman, an expert at Centre for Strategic and International Studies in Washington, the best that can be hoped for is agreement on access to roads for the withdrawal of US equipment.
The peace negotiations with the Taliban that Mr Obama spoke of have begun far too late - realistically they should have opened at least two years ago - to have real meaning. The Taliban, according to Mr Cordesman, "don't need to initiate attacks on ISAF (International Security Assistance Force) and US forces; they only need to wait and let them shrink."
Ahmed Rashid, the Pakistani writer and expert on the Taliban, argues that the negotiation process is stuck because the US military hold a veto over it, and are refusing to take the first confidence-building step, which is to release some Taliban prisoners from Guantanamo Bay. The good faith of the Taliban, of course, has to be in doubt. But Rashid believes that the absence of real negotiations will only strengthen the Taliban hardliners and encourage Iran and Pakistan to arm their proxies in preparation for what may be a decisive round of fighting in two years time.
But there is one intriguing precedent in the history of Afghanistan.
After the Soviet troops withdrew in 1989, the former communist president they abandoned, Najibullah, was universally predicted to fall within months. But thanks to supplies of arms and oil from Moscow, his army stood its ground, and inflicted a searing defeat on the mujahideen at Jalalabad. He probably could have lasted in power but for the fact that the Soviet Union collapsed at the end of 1991, and all aid ceased in January 1992. Kabul fell four months later.
Ultimately it is the Afghans who must decide the fate of their country. But if the US devotes enough resources and diplomatic muscle - in place of the military power which has decisively failed - then large parts of the country could enjoy some stability after the troops leave.