Prince Charles will attend the funeral of former South African president Nelson Mandela next Sunday.
A Buckingham Palace spokeswoman said he would be representing the Queen at the service in Qunu, South Africa, on December 15.
Prime Minister David Cameron has said on Twitter that he will be at Mr Mandela's memorial service on December 10.
Charles, who has made several visits to South Africa, is understood to have sent a private letter of condolence to Mr Mandela's widow Graca Machel following his death last week.
The Duchess of Cornwall will not be accompanying him to the funeral, a Clarence House spokeswoman said.
Mr Cameron wrote on Twitter: "I'll be at the memorial service in South Africa on Tuesday to commemorate the great man. #RIPMandela."
The official memorial service will take place at the FNB Stadium in Johannesburg, the South African government said.
A message on the government website said it would be attended by members of the public as well as heads of state.
"This will give ordinary people and public leaders an opportunity to celebrate Madiba's life collectively," they said in the statement, using the clan name Mr Mandela was affectionately known by.
A state funeral will be held days later, with the South African government saying "a funeral service and interment ceremony will take place at President Mandela's home and final resting place at Qunu in the Eastern Cape."
Charles and Prince Harry visited South Africa in 1997 and met Mr Mandela at his Pretoria residence. The previous year, Charles had hosted Mr Mandela on a visit to Brixton during his first state visit to the UK.
The most recent trip to South Africa for Charles was in 2011, when he and Camilla made an official visit to Tanzania and South Africa. On that occasion, they visited the Nelson Mandela Foundation in Pretoria and were greeted by Mrs Machel.