The funeral has taken place in Kabul of Afghanistan's last king, Mohammad Zahir Shah, who died on Monday aged 92.
Dignitaries from around the world bade farewell to the man known as the father of the nation. He was buried beside his father and wife on a hill above Kabul.
Zahir Shah returned from exile in 2002, 29 years after being deposed in a coup orchestrated by his cousin.
Many Afghans see the former king as a symbol of the national unity that has been lost amid years of conflict.
In the latest violence, the Nato-led force said six of its troops had been killed in the south of the country.
Scores of Taleban rebels were also reportedly killed - there is no independent confirmation of the claim.
A guard of honour carried the former king's coffin draped in the Afghan flag to a viewing stand under a shade of pine trees at the palace grounds in the capital.
Cabinet members and parliamentarians filed past, bowing their heads and giving their condolences to the bereaved family.
The coffin was conveyed to Kabul's main mosque where thousands of mourners had gathered for prayers.
Zahir Shah was then taken to a hilltop mausoleum overlooking the city where he was laid to rest.
Television and radio stations in Afghanistan have been broadcasting Islamic recitations interspersed with tributes to the ex-king.
These include old footage of Zahir Shah's 40-year reign, which began in the year Adolf Hitler came to power in Germany.
The new British Foreign Secretary, David Miliband, was among those attending. He flew into Kabul earlier on Tuesday on a pre-planned trip, his first official visit abroad in his new post.
His counterparts from Pakistan, India, Canada and Italy and the Pakistani prime minister are also present.
Tributes to the former king have been sent from around the world.
US President George Bush described him as "a monumental figure in Afghan history".
Police and foreign troops in the capital, Kabul, stepped up security ahead of the state funeral, occupying high points which could be used by militants to attack the ceremony.
Afghan and Nato troops have recently been in heavy fighting
The Nato-led force says that four of the six troops who died in the latest fighting on Monday were victims of a bomb blast.
Not all the nationalities are known, but Norway says it has lost one special forces soldier.
The US-led coalition, which operates alongside Nato-led forces, says that it and Afghan troops killed more than 80 Taleban rebels in clashes in southern Helmand province.
Afghan officials have mentioned 30 insurgent deaths.
The Taleban have meanwhile further extended a deadline for demands to be met for the release of 23 South Korean hostages.