Afghan elders will decide on the key issue of whether American soldiers remaining in the country after 2014 will be granted immunity from prosecution, President Hamid Karzai said.

US President Barack Obama warned last week that no American troops would remain behind in Afghanistan after the withdrawal of NATO forces in 2014 unless they were granted immunity from prosecution in local courts.

"The US is standing firm by its demand for immunity for its soldiers," Karzai told a news conference on Monday on his return from Washington where he held talks with Obama on Friday.

"The Afghan government can't decide on this. This is up to the Afghan nation to decide. The Loya Jirga will decide," he said, referring to the national assembly of tribal elders.

Obama, planning to withdraw most of the 66,000 US troops left in Afghanistan, said that after 2014 American forces would have a "very limited" mission in training Afghan forces and preventing a return of al-Qaeda.

But he warned that Karzai, with whom he has had at times a testy relationship, would have to accept a security agreement, still under discussion, granting legal immunity to US troops who remained.

"It will not be possible for us to have any kind of US troop presence post-2014 without assurances that our men and women who are operating there are (not) in some way subject to the jurisdiction of another country," Obama said.

Karzai said that after 2014, US troops would be in Afghanistan "in small numbers, very, very small numbers like in Germany, Turkey or South Korea, like in Japan".

Their presence would be based on an agreement which could take eight to nine months to finalise he said, adding that the US proposals were not yet acceptable.

When asked if security would deteriorate in Afghanistan after the withdrawal of the NATO-led force, Karzai replied: "By no means... Afghanistan will be more secure and a better place."