Afghanistan and the United States have agreed the contents of a long-awaited deal to define their relationship after most foreign troops leave at the end of 2014, although the document sidesteps some of the thorniest questions about the US military presence.
Negotiations on the strategic partnership deal have dragged on for over a year, initially held up by two demands from the Afghan president, Hamid Karzai, that he said were critical to restoring national sovereignty: Afghan control of jails and an end to night raids on Afghan homes.
Western officials argued for months that the first demand was not practical and the second could undermine the military effort, but they eventually agreed compromises on both.
The main US prison is now in the middle of a six-month handover, and Afghan forces have taken control of night raids, under two separate agreements signed within a month of each other, paving the way for the strategic partnership deal.
"Today Afghanistan and the US initialled and locked the text of the strategic partnership agreement," said Karzai's spokesman, Aimal Faizi. "This means the text is closed, and both sides will now review the document and do a final consultation. In the US it will go to the houses of Congress and the president; in Afghanistan the president will consult with national leaders plus both houses of parliament."
Both sides agreed to set aside difficult questions about long-term US access to military bases and the status of any US forces that do stay on in Afghanistan.
Washington and its allies wanted to have the US-Afghan strategic partnership agreed before May, when a Nato conference in Chicago is expected to pledge long-term help to Kabul with finances and military training.