ALMOST 60 foreign heads of state or government will pay tribute to Nelson Mandela in person by attending either a memorial ceremony or state funeral for the former president of South Africa.

A foreign ministry spokesman said the final list of who would be at either tomorrow's memorial in Johannesburg or the funeral in Qunu next Sunday would be confirmed in due course but 59 are known to be planning to attend.

Prince Charles is to attend the funeral, with a royal spokeswoman saying he would be representing the Queen at the service in Qunu on December 15.

Prime Minister David Cameron has said on Twitter he will attend Mandela's memorial service on December 10.

Prince Charles is understood to have sent a letter of condolence to Mandela's widow, Graca Machel, following his death last week. The Duchess of Cornwall will not be accompanying him.

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, at the FNB Stadium in Johannesburg, will 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," the South African government said in a statement, using Mandela's clan name.

A state funeral will be held days later, with the 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."

Prince Charles and Prince Harry visited South Africa in 1997 and met Mandela at his Pretoria residence. The previous year, Charles had hosted Mandela on a visit to Brixton during his first state visit to the UK.

Prince Charles's most recent trip to South Africa was in 2011, when he and Camilla made an official visit. They visited the Nelson Mandela Foundation in Pretoria and were greeted by Mrs Machel.

The Archbishop of Canterbury praised Mr Mandela for his "extraordinary" courage at a service of thanksgiving earlier yesterday.

The Most Rev Justin Welby told a congregation at St Martin-in-the-Fields in Trafalgar Square that Mandela was the "rarest of leaders" as he thanked God for his life.

The archbishop read the sermon, saying: "Nelson Mandela showed his courage by his determination in the face of evil and by his humanity in the experience of victory.

"What is more, such courage and humanity were learned and demonstrated in the midst of conflict and suffering. He was that rarest of leaders: those who learn from terrible events so as to exhaust all their lessons, rather than being shaped by them into bitterness and hatred."

He called for prayers for South Africa as the nation mourned Mandela.

The service was led by the Rev Dr Sam Wells, vicar of St Martin's, who told the congregation: "It would be hard to name a world figure in the last 30 years more universally respected than Nelson Mandela.

"Today, all the people of the nations of the world grieve his death."

The service was broadcast on BBC Radio 4 and featured a live link to Christ the King Church in Sophiatown in Johannesburg. Former Poet Laureate Andrew Motion read a poem, entitled To Nelson Mandela: A Tribute, during the service.

Westminster Abbey will hold a national service of thanksgiving for the life of Mandela after his state funeral, and Parliament will hold a special ceremony to commemorate his life. A book of condolence has been opened in St Margaret's Church at the abbey.

The Queen is also understood to have written to Mrs Machel expressing her sympathies.

She has visited South Africa on numerous occasions and hosted Mandela on his two state visits to the UK, in 1996 and 2001.

The Queen also received him at Buckingham Palace in 2008, during a visit to London to mark his 90th birthday.