Image caption President Karzai said he accepted the conditions proposed by the loya jirga

Afghan President Hamid Karzai has won the endorsement of tribal elders and community leaders to negotiate a 10-year strategic partnership with the US.

The proposed pact would see the presence of US troops after 2014, the date for foreign troops to leave.

But delegates at the loya jirga, or traditional assembly, in the capital Kabul, set conditions for a pact.

The jirga's decisions are not legally binding, with parliament having the final say.

'End to night raids'

While delegates at the four-day loya jirga gave their blessing to the pact, they also imposed conditions which may make it harder for an agreement to be reached, says the BBC's Orla Guerin in Kabul.

Negotiations have already dragged on for close to a year.

Delegates demanded an end to night raids - which are hated by Afghans, but seen as crucial by US commanders.

They also called for detainees to be placed in Afghan custody, and for US nationals who commit crimes in Afghanistan to be held to account.

The assembly also endorsed peace talks with Taliban members who wish to abandon violence.

But it is unclear if there is anyone to talk to.