“The next Head of the Commonwealth shall be His Royal Highness Prince Charles,” the 53 member countries said in a statement.
Queen Elizabeth had told leaders on the first day of the summit on Thursday that she wanted her eldest son to succeed her in the symbolic figurehead role, which is non-hereditary.
Queen Elizabeth, who turns 92 on Saturday, spoke of her own “extraordinary journey” since pledging to serve the Commonwealth for life when aged 21.
“It is my sincere wish that the Commonwealth will continue to offer stability and continuity for future generations and will decide that one day, the Prince of Wales should carry on the important work,” she said, referring to Charles.
Queen Elizabeth has been the Commonwealth’s head since her father king George VI’s death in 1952.
Some republican voices had been angling for change in future but Prime Minister Theresa May gave her backing to 69-year-old Charles, who is heir to the throne of 16 Commonwealth nations, saying it was “fitting” that he should have the role.
Other Commonwealth leaders including Canadian Prime Minister Justin Trudeau also publicly endorsed Charles.
The summit also agreed a series of commitments on marine protection, combating malaria and guaranteeing 12 years of education for children in all member states by 2030.
– ‘Not welcome’ –
This week’s gathering of Commonwealth leaders was, however, marred by a row over Britain’s threat to deport some of the immigrants who came to Britain from the Caribbean in the 1950s and 1960s because they did not have residency papers.
May was forced to apologise to Caribbean leaders on Tuesday and has faced questions over her own time as interior minister between 2010 and 2016 when she initiated policies aimed at creating a “hostile environment” for illegal immigrants.
Large-scale Caribbean immigration to Britain began in 1948 — when the ship Empire Windrush brought over the first group of West Indian immigrants — and finished in the early 1970s.
They and their parents were invited to help rebuild Britain after World War II and with many of them legally British — they were born while their home countries were still colonies — they were given indefinite leave to remain.
Some have not been able to prove their status, however, and have faced deportation threats and expensive legal cases.
The government has now set up a helpline which as of Friday was helping 286 cases. The interior ministry said it had granted permanent status to eight people so far this week.
But the government has faced outrage over its approach.
Around 500 people gathered in Windrush Square in Brixton, a part of south London where many Caribbean immigrants settled, for a demonstration later on Friday.
“We have what people thought was their own government telling them they’re not welcome in their own country,” Gary McFarlane from Stand Up To Racism, a campaign group, told the crowd.
“Unless you actually stand up and fight back, things can go backwards,” he said.