An emergency "loya jirga" (Pashto for "grand assembly") was held in Kabul, Afghanistan between 11 and 19 June 2002 to elect a transitional administration. The loya jirga was called for by the Bonn Agreement. The agreement (designed by Afghan leaders) was drawn up in December 2001 in Germany. Conducted under United Nations auspices, the talks at Bonn sought a solution to the problem of government in Afghanistan after the US ousted the Taliban government.
Then-UN Secretary-General, Kofi Annan, announced the composition of the Commission in charge of the loya jirga on 21 January 2002; it was to be chaired by Ismail Qasimyar, a legal and constitutional expert. One of his two deputies was Mahboba Hoqomal, a female lecturer in political science. The commission decided that the Loya Jirga would be open for 1450, of which 1051 would be chosen by an indirect elections. Each district elected 20 people, who then held a secret vote to select one person to represent the whole district. Each of the country's 362 districts had at least one seat, with further seats allotted for every 22,000 people. The commission would reserve another 100 seats for refugees, 25 for nomads, 53 seats for members of the interim administration and the commission and 160 seats for women. It was the first time in the history of Afghanistan that women attended a loya jirga. In May, concern was being expressed that the armed factions in several provinces were influencing the selection of the members of the Loya Jirga and the Commission had received numerous complaints of intimidation and also of violence.
The Loya Jirga meets in a giant, air-conditioned and carpeted tent at the Polytechnic University campus in Kabul. Some 2,000 delegates, 500 more than the number invited, arrived at the beginning of June. These included 50 additional delegates to satisfy the demands of various warlords.
The most important thing the Loya Jirga had to do was to choose a president for the Afghan Transitional Administration who would lead the country until the official presidential elections in 2004. At the beginning, there were two candidates who had declared to run: former president of Afghanistan Burhanuddin Rabbani and the US-backed chairman of the Afghan Interim Administration, Hamid Karzai. Karzai was also supported by Abdullah Abdullah and Mohammad Fahim, two important leaders of the Northern Alliance. A third possible candidate was Zahir Shah, former king of Afghanistan until 1973. He had spent years living in Rome but had returned to Afghanistan after the fall of the Taliban regime. Already at the Bonn Conference which installed the interim administration there was a group of supporters of Zahir Shah, called the Rome-group, who wanted to take the former king to take up the position of head of state.
Upon arrival in Kabul, more than 800 delegates signed a petition urging the nomination of Zahir Shah as head of state, if only as a figurehead. In view of the speculation, which the petition aroused, US and UN representatives pressed the former king to withdraw. The start of the Loya Jirga was delayed from 10 to 11 June because of "logistical and preparatory problems." On 10 June, the US representative Zalmay Khalilzad gave a press conference in which he declared that Zahir Shah was not a candidate. The same day, in a press conference of Zahir Shah, the former king confirmed this and said "I have no intention of restoring the monarchy. I am not a candidate for any position in the Loya Jirga." Hamid Karzai, who sat next to Zahir Shah at the press conference, called Zahir Shah the "father of the nation" and thanked him for the "confidence His Majesty has put in me."
The loya jirga was formally opened by Zahir Shah, king of Afghanistan from 1933 to 1973. Also, Hamid Karzai played a major role in the opening session and called Zahir Shah the father of the nation. Karzai proclaimed him Honorary Chairman of the National Assembly which would give the former king a supervisory role in writing the new constitution and would give him the position to preside over national celebrations.
The interim government was for a great deal dominated by Tajik warlords from the Northern Alliance, so the Pashtun majority wanted the following transitional administration to be more representative. Because of this issue, Yunus Qanuni, one of the Northern Alliance leaders, told the opening session he would be resigning Interior Minister so Karzai could strengthen the national government by broadening its ethnic mix, while former president Burhanuddin Rabbani withdrew his candidacy in favour of Hamid Karzai "for the sake of national unity".
Karzai went into the race for head of government uncontested, but two other candidates emerged. To be on the ballot at the loya jirga, a candidate had to submit 150 signatures for his candidacy. Glam Fareq Majidi gathered only 101 signatures, so he was disqualified as candidate. Former mujahedeen fighter Mohammed Asef Mohsoni submitted a list with 1,050 names for Karzai and also Masooda Jalal, a doctor working with the World Food Programme, and Mahfoz Nadai, an army officer, poet and a deputy government minister, gathered enough signatures to be on the ballot.
During the first day, several bodyguards, including aides of Ahmad Wali Masood, were arrested, after aiming weapons at International Security Assistance Force (ISAF) guarding the compound. The second day saw 60 to 70 delegates stage a walk out. They were disillusioned about the political maneuvering surrounding the loya jirga and frustrated over what they believed to be the lack of a free vote on the country's future.
The election for president of the transitional administration was held by secret ballot on 13 June — with black-and-white photos of the candidates adjacent to their names. Hamid Karzai was chosen with an overwhelming majority of 83% and stayed in office as President.
After pressure, Northern Alliance-controlled members of the National Directorate of Security were permitted free access to the Loya Jirga deliberations, even without being a delegate. As a response, delegates to the Loya Jirga were subjected to intimidation and surveillance by Afghan warlords and intelligence services, said Human Rights Watch: "Warlords not appointed to the assembly were allowed inside the tent where the Loya Jirga is in session, mingling with the delegates and threatening those who called for their exclusion or opposed their agenda" According to delegates interviewed by Human Rights Watch, "A number of the most prominent warlords gathered Monday night to divide power in the next government." 
On 19 June, Hamid Karzai announced to the jirga the names of 14 ministers of the future Afghan transitional administration, as well as three Deputy Presidents and a Chief Justice. The same day he was sworn in as President. All three posts of Vice-President were given to the Northern Alliance commanders though Karzai was careful to make sure none of the vice-presidents were from the same ethnic background. After Karzai had announced his list, he asked for approval by a show of hands. He then continued speaking with hardly a pause.
At the same day the jirga was closed. The reports about the jirga were positive. "Delegates from all backgrounds - Pashtuns, Tajiks, Hazaras and Uzbeks, urban and rural, Sunni and Shiite - sat together as if we belonged to a single village" delegates Omar Zakhilwal and Adeena Niazi the International Herald Tribune wrote. However, they were disappointed about the outcomes since the power of the warlords wasn't reduced in the new government. The move to promote Zahir Shah as Head of State had been an attempt to have someone independent enough to face up to the warlords.
After the loya jirga there was some controversies about the government Karzai had named and several names were added to the list before the actual cabinet was sworn in on 24 June. Yunus Qanuni was unhappy with the post of Education Minister he had been assigned, since he had expected to become something like prime minister. Qanuni said he considered not joining the government at all. Kabul's traffic police staged two days of strikes, on 20 and 21 June, to express their offence at Qanuni's apparent demotion and the staff of the Interior Ministry initially refused to allow Mr Wardak to enter the ministry building. After Karzai appointed Qanuni special adviser on security he decided to join the administration anyway, but he also formed a party outside of the government and run for president in the next elections. There was also controversy around the post of minister for woman's affairs: Sima Samar had been very outspoken and threats made against her as well as complaints by the supreme court who eventually decided not to charge her with blasphemy. Because Samar was not on the list there was no minister appointed for woman's affairs. Karzai later appointed Mahbuba Huquqmal as representative in the Women's Affairs Ministry.