The strategic partnership deal tries to lay down rules for US troops in Afghanistan after 2014, when all Nato-led foreign combat forces are due to leave.
After four days of debate, the 2,000 elders from around the country backed Karzai’s plan.
But there were conditions, among them:
- US nationals committing crimes in Afghanistan will not have immunity;
- The US must side with Afghanistan if another country tries to attack it;
- An end to night raids on Afghans’ homes by US forces;
- Responsibility for all prisons to be handed to Afghan authorities;
- The initial agreement would be valid for 10 years.
During the meeting Karzai promised Afghanistan’s neighbours that the bases would not be used for attacks on them.
"We will act on the basis of your consultation," Karzai told the delegates. "I am very happy that you have accepted it and have put lots of conditions on it. I accept this resolution. It is the instruction to the Afghan government from the Afghan people."
The loya jirga is a consultative body and Karzai does not need its permission to reach a deal with the US, but he wanted its backing to strengthen his position at the talks.
The meeting also backed holding talks with members of the Taliban who renounce violence, but called for a “revision” of strategy in the light of September’s assassination of peace envoy and former president Burhanuddin Rabbani.
Friends and enemies must be clearly identified, it said, and the identity of peace envoys should be checked. Rabbanis assassins pretended to be envoys of Taliban interested in peace talks.
A number of key figures including Karzai's main rival Abdullah Abdullah boycotted the jirga amid questions over how delegates were appointed.