Up to 15,000 foreign troops could remain in Afghanistan after 2014 if a security pact is agreed with the US, Afghan President Hamid Karzai has said.
He was speaking at the opening of a Loya Jirga, or grand assembly, of more than 2,000 Afghan elders, who have gathered to discuss the deal.
One of the key sticking points has been the circumstances under which US troops could enter Afghan homes.
Another is whether US troops will be subject to US or Afghan justice.
But a draft of the deal, released by Kabul before the meeting started, appeared to show that Mr Karzai had conceded that US troops would not be tried in local courts.
“Afghanistan authorises the United States to hold trial in such cases, or take other disciplinary action, as appropriate, in the territory of Afghanistan,” the document says.
According to the draft, the deal will remain in force “until the end of 2024 and beyond”.
Currently the multinational Nato force is due to pull out of Afghanistan from 2014.
US Secretary of State John Kerry said on Wednesday his team had agreed the text of the agreement with Afghan officials, but it was not clear if the draft published by Kabul was the one to which he was referring.
Opening the four-day Loya Jirga, President Hamid Karzai said the only issue on the table was whether the security agreement would be signed.
“I hope that no other agenda will be discussed,” he said.
He read from a letter he said had received from President Barack Obama, explaining why US forces should be allowed to enter Afghan homes under “exceptional circumstances” to save American lives.
A woman delegate shouted from the floor that US troops had spilt too much Afghan blood and should be stopped.
Mr Karzai acknowledged there were difficult issues involved in the deal, but according to the BBC’s Kabul correspondent David Loyn, the tenor of the president’s speech was to advise delegates to accept the agreement.
Mr Karzai said that a number of world leaders – including from Russia, China, and India – were backing the deal, and that it would provide the security Afghanistan needed, as well as the foundation for forces from other Nato countries who were assisting Afghan troops.
The delegates will now meet in smaller closed-door groups to look at the deal in detail.
If the assembly approves the bilateral security agreement, it will still have to be passed by the Afghan parliament.
Earlier this week, there had been little hope that a deal could be reached, because President Karzai had disagreed with certain US demands.
But on Wednesday Mr Kerry said the terms had been agreed.
“There were some people who may have questioned or doubted whether that was going to happen. Well, it’s happening tomorrow,” he told reporters at the state department.
“We have agreed on the language that would be submitted to the Loya Jirga, but they have to pass it.”
But he emphasised that even if the deal was passed, the role of the US military after 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.
The agreement has been the subject of months of tense negotiations and both sides have refused to budge on certain issues.
The Afghans have long opposed US raids on Afghan homes, particularly night raids because they are perceived to violate the sanctity of women in the home.
The US insistence on immunity from prosecution for troops remaining in Afghanistan after 2014 has been central to Washington’s demands.
The failure to resolve a similar legal issue in Iraq led to a total withdrawal of US forces.
Security is tight for the meeting after a suicide bombing last weekend near the huge tent where it is being held.
The Taliban has branded the meeting a US-designed plot, and has vowed to pursue and punish its delegates as traitors if they approve the deal.