Thousands of Tongans have attended the funeral of King Taufa'ahau Tupou IV, who died last week at the age of 88.
The capital came to a standstill for the farewell
The ceremony in the capital, Nuku'alofa, combined Christian and traditional rituals.
Representatives from 30 foreign countries watched as the late king's coffin was carried by 1,000 men to the official royal burial ground.
King Tupou IV ruled the Pacific nation for more than four decades, and was much loved by his people.
But his death is likely to fuel calls for greater reform.
Nuku'alofa came to a standstill as the people of Tonga said goodbye to their revered leader.
Buildings, roadsides and palm trees were covered in the customary black and purple mourning cloth.
For the past week, a constant stream of people has filed past the royal family's seaside palace, leaving flowers and other gifts for the king's widow. Thousands have also taken part in overnight prayer vigils.
On Tuesday morning, amid cannon fire, the coffin was carried out of the palace by an army of Tongan men in traditional dress.
They were joined by dignitaries from dozens of countries. Among them were Australian Governor-General Michael Jeffery, Japan's Crown Prince Naruhito and the Duke and Duchess of Gloucester from the UK.
The prime ministers of New Zealand and Fiji, Helen Clark and Laisenia Qarase, also paid their respects.
King Tupou IV died last week in a hospital in Auckland, after a long illness.
His death is being marked by a month of official mourning, although the royal family will observe a six-month mourning period.
The late king will be succeeded by his son, Tupou V, who will be officially crowned when mourning comes to an end.
The new king is likely to face mounting pressure to introduce social reform.
Last year, thousands of Tongans took part in unprecedented demonstrations to demand greater democracy and public ownership of key national assets.