Zahir Shah was a symbol of Afghan unity
During Mohammad Zahir Shah's 40-year rule of Afghanistan, the country was transformed into a modern democracy. In 2002, the ex-king returned home after nearly three decades in exile, to become a unifying symbol of peace and freedom among his former people.
Born in Kabul in 1914, Zahir Shah was educated in France. The last monarch of a 200-year-old Pashtun dynasty, he ascended the throne, aged 19, in 1933, following the assassination of his father, Nadir Shah.
During World War II, the king safeguarded his country's neutrality and, throughout his reign, Afghanistan enjoyed a period of stability.
Foreign advisers helped the king modernise his nation and, in 1964, his new constitution transformed the country into one with free elections, civil rights, female emancipation and universal suffrage.
He built the country's first university, and developed cultural and commercial bonds with the West. Travellers began to view Afghanistan as an attractive destination, with its mountains, rich culture and the relics of many ancient civilisations.
But the country's tribal factions continued to wrangle. In July 1973, the king was ousted in a coup, at the behest of his cousin Mohammad Daoud, an opponent of Zahir Shah's new western alliances.
Zahir Shah was in Italy for medical treatment at the time, and remained there for another 28 years. He could only watch as his country suffered civil war, the 1979 Soviet invasion and, more recently, the rise of the fundamentalist Taleban regime.
Afghan crowds celebrated Zahir's return in 2002
1n 1996, the Taleban's capture of the Afghan capital Kabul brought with it harsh legal restrictions on the country's minorities and the ending of women's rights.
Throughout all this, the exiled former king maintained that he would be "ready to return to Afghanistan if it serves to help my people".
And so it proved. After America was attacked in September 2001 and US outrage was focused on Afghanistan, Zahir Shah gave a rare interview defending his former subjects.
He said that a new government would soon be decided by a "loya jirga", a national gathering of elders, intellectuals and other influential figures.
On 17 April 2002, the former king stepped back onto Afghan soil. He was given an overwhelming welcome by the country's people, many of whom were reassured by his very presence.
Members of the king's own tribe, the Pashtuns, had been neglected during the tenure of the Northern Alliance government, which had replaced the Taleban. On the king's return, many Pashtuns called for the restoration of the monarchy.
Hamid Karzai welcomed Zahir Shah on his return
But some Afghan warlords and politicians feared his return. On more than one occasion, Zahir Shah found that when he made a speech on live television, the sound failed to be transmitted.
The former king himself felt unable to preside over long meetings, and warlords, members of al-Qaeda and Mujahideen fundamentalists all posed a threat to his safety.
Instead, Hamid Karzai led the country's new alliance. Zahir Shah remained a private citizen, but security was tight around his 1970s-built palace.
He was given the title of "baba-i-millat-afghan" - father of the Afghan nation - but his was largely a ceremonial role. To rebuild the devastated country, Zahir Shah knew that Afghanistan needed the help of such institutions as the United Nations and the European Union.
However, the former king was determined that the future of his country should remain firmly in the hands of Afghans. He held dear the wish for his people "to decide their government in a democratic manner, with free elections".
Following his return home, the former king enjoyed the enduring respect of his people. Although his political role was limited, until his death Zahir Shah remained a symbol of peace, reform and stability in the war-ravaged provinces of his beloved Afghanistan.