Does deal mark new era in US-Afghan relations?
Relations between Afghanistan and the US have entered a new phase with the signing of the Strategic Partnership Agreement between the two countries.
The agreement aims to make it clear that the West will not turn its back on the country - an important message for audiences in Afghanistan and its neighbours as well as in Nato countries.
But it also sends a clear signal to the militants and their supporters: the game is not yet over in Afghanistan and the US and its Nato allies remain committed to fighting ''al-Qaeda and its extremist allies''.
At the same time, however, the agreement keeps the door open for dialogue and a political settlement with the insurgents.
While some in the Taliban may see the deal as adding further weight to their determination to carry on fighting, others may conclude that it gives them more reasons to talk to the government once it gains full sovereignty of the country.
Statement of intent
But no-one should be under any illusions about the overall aim of this agreement - to give the US a foothold to help Afghanistan train and equip its forces.
It provides Washington with a platform to gather intelligence on the insurgents while simultaneously enabling it to monitor activities in neighbouring countries.
America wants to make it clear to them that it will not abandon Afghanistan, whose government will have enough foreign backing to remain firmly in power.
It is a statement of intent that seems to be especially directed towards Pakistan and Iran, both of which have ambitions to be influential in the region and who both see the long term presence of US and Nato forces in Afghanistan as against their geo-strategic interests.
Tehran and Islamabad have warned that an "irresponsible" withdrawal of international forces from Afghanistan could result in chaos in the wider region.
The US in response sees some of Afghanistan's neighbours as not doing enough to dismantle insurgent safe havens based there.
President Obama was working to a tight deadline.
He will be hosting Nato leaders in Chicago later this month and wanted to show long-term US commitment to stability in Afghanistan before asking other allies to follow suit.
Both he and President Karzai knew that the timing of the deal was also symbolically important.
It was perhaps no coincidence that it was signed on the anniversary of the raid that killed Osama Bin Laden.
President Obama was reminding Americans that he was responsible for killing the most wanted man in America's recent history.
He was reassuring them that US soldiers will soon be coming back home - a narrative that will definitely help him in the November presidential election.
The legally binding deal - which governs relations between the two countries from 2014 to 2024 - was signed after 18 months of negotiations and after more than 20 drafts.
It took so long principally because of two key Afghan concerns: President Karzai's desire for US-run jails in his country to be handed over to Afghan control and an end to night raids on Afghan homes by foreign forces that offended many Afghans and served as useful propaganda for the Taliban.
The president said that both issues - resolved in earlier agreements - were critical to restoring Afghan national sovereignty.
Under the terms of the deal, Afghanistan is now designated by the US as a major "non-Nato ally".
To avoid creating a sense of occupation, a clause was inserted into it which stipulates that the US does not seek permanent military bases in the country.
But a number of things are still unclear.
- What will be the specific US troop presence after 2014, where those troops will be based and what will be their exact role and numbers
- The immunity of US soldiers from prosecution in local courts. Most Afghans want this, but the US is not enthusiastic
- The future funding of the Afghan security forces - and other development projects - that have to be approved by Congress
Under the terms of the deal, the Afghan government has pledged once again to tackle issues over which it has made lamentably slow progress in recent years - including the fight against corruption, protecting human rights - especially the rights of women - and improving efficiency.
While the agreement allows either side to walk away from it - providing they give one year's notice - it does not detail what will happen if the various goals outlined in it are not met.
Instead it contains a series of pledges that reflect the complicated realities on the ground. On the one hand it forbids the US from launching attacks against a third country from Afghan soil, but on the other hand it gives the Americans the right to take action against a third party's "interference" in Afghanistan.
Yet despite some of these seemingly inexplicable contradictions, few disagree that this agreement could be vital when it comes to Afghanistan's chances of achieving political stability and economic prosperity.
While it is widely accepted that many other things need to be done to cement peace in Afghanistan, it is no exaggeration to say that this deal has the potential to change the course of the country's history.