The United States and Afghanistan have agreed on a draft proposal which commits the US military to Afghanistan for at least ten more years.
The draft agreement, which lays out the terms and conditions for Washington's military engagement in Afghanistan beyond 2014, will be discussed by the Afghan Loya Jirga, or the grand council of elders. If agreed, it will come into force on 1 January 2015.
"We have reached an agreement as to the final language of the bilateral security agreement that will be placed before the Loya Jirga tomorrow," US Secretary of State John Kerry told reporters in Washington, according to Reuters.
Kerry said the final nuances of the bilateral security accord were reached during his talks with Afghan President Hamid Karzai.
"They have to pass it ... it's up to the people of Afghanistan," Kerry said, referring to the debate in the Loya Jirga, which starts on Thursday.
The draft accord suggests that the US has got its way on many of the controversial issues that previously stalled the progress of the talks.
The language in the draft compact was finalised after the US and Afghanistan agreed on certain controversial clauses, such as legal immunity for US troops in Afghanistan and the role of the troops in counter-terrorism operations.
The US had made it clear the troops would be withdrawn at the end of 2014 if Kabul did not concede its demand that troops should be subject to US justice rather than Afghan local courts.
According to the draft, the US is not committed to defending Afghanistan from foreign attacks, while the phrasing does not absolutely rule out the US acting on its own while facing situations such as an al-Qaida threat.
The draft also allows unfettered overflight rights of US military aircraft. Although it says the US forces "shall not target Afghan civilians, including in their homes", the phrasing clearly does not deny US troops the right to enter Afghan residences.
If the Loya Jirga approves the draft, the bilateral pact would remain in place "until the end of 2024 and beyond, unless terminated" by mutual agreement with a two-year notice by either party.
The bilateral deal will ensure that US forces would stay in the war-torn country and help its administration face the Taliban challenge.
Kerry said the role of the US military in Afghanistan beyond 2014 would be limited.
"It is entirely train, equip and assist. There is no combat role for United States forces, and the bilateral security agreement is a way to try to clarify for Afghans and for United States military forces exactly what the rules are with respect to that ongoing relationship," he said.
However, the US does not foresee a residual force staying in Afghanistan until anywhere near 2024, and there has been no decision on the size of any post-2014 deplyment, according to a senior administration official quoted by Reuters.
The talks had faced last-minute hiccups over disagreement on a letter of apology from the US, acknowledging mistakes made during the 12-year Afghan war, including civilian deaths. But Kerry categorically denied there was an offer of apology from President Barack Obama.
"The important thing for people to understand is there has never been a discussion of or the word 'apology' used in our discussions whatsoever," Kerry said.