The Prince of Wales will be the next head of the Commonwealth, its leaders have announced.
The Queen had said it was her “sincere wish” that Prince Charles would succeed her in the role “one day”.
Leaders of the Commonwealth have been discussing the issue at a meeting behind closed doors at Windsor Castle.
The non-hereditary role would not have automatically passed to Prince Charles, with some suggestions it might rotate among the 53 leaders.
Prime Minister Theresa May and Canadian PM Justin Trudeau had earlier given their backing to Prince Charles.
The meeting during a two-day summit involved 46 heads of Commonwealth governments and foreign ministers from the remaining seven countries.
The Commonwealth represents about 2.4bn people, but critics say the organisation is so disparate that it struggles to know what it is for, BBC royal correspondent Jonny Dymond said.
He also said the news of the prince’s appointment would be “of great satisfaction” to the Queen.
Other issues under discussion at the two-day summit in London have included ocean conservation, cyber security and trade between the countries.
The decision over who succeeds the Queen after her death needed to be unanimous.
Meanwhile, the government has indicated it would welcome Zimbabwe’s re-entry to the Commonwealth after Robert Mugabe pulled the country out in 2003.
Rwanda has been chosen to host the next summit in 2020.
The role, currently held by the Queen, is largely a symbolic one and carries no maximum fixed term.
It is used to unify the 53 member states and to ensure the core aims of the Commonwealth are fulfilled. These include linking the countries through trade and international co-operation.
The head of the Commonwealth usually makes regular visits to the member states to foster these connections personally.
A decision on all successive heads has to be made by the Commonwealth leaders.
Meanwhile, the Commonwealth Secretary-General and the Secretariat, its central organisation, help to plan many Commonwealth activities.