He also cited Mr Mandela's weaknesses, including "his steadfast loyalty to his organisation and some of his colleagues who ultimately let him down".

Mr Mandela had been receiving treatment at home for a recurring lung illness since September, when he was discharged from hospital.

As soon as the news of his death broke late on Thursday, small crowds began to gather in Soweto's Vilakazi Street, where Mr Mandela lived in the 1940s and 1950s.

Across the world, leaders, celebrities and members of the public have been paying tribute.

Pope Francis said Mr Mandela had forged "a new South Africa built on the firm foundations of non-violence, reconciliation and truth".

Queen Elizabeth II said she was "deeply saddened" to learn of Mr Mandela's death and said she remembered her meetings with him "with great warmth".

Media playback is unsupported on your device

Media captionWhat was apartheid? A 90-second look back at decades of injustice

"He achieved more than could be expected of any man. Today, he has gone home," said US President Barack Obama.

The White House has announced that Mr Obama and First Lady Michelle Obama will be travelling to South Africa next week to pay their respects and take part in memorial events.

Analysis

By Pumza FihlaniBBC News, Soweto

South Africans are mourning Nelson Mandela through songs of struggle and church hymns. One of the songs is "Nelson Mandela ha hona ea tshwanang le yena" which in Sotho means there is no-one like Nelson Mandela. This song and many others like it encapsulate the deep sense of loss here and the realisation that his passing marks the end of an era.

Even South Africans who had never met him had made a special place for him in their hearts. They will remember him as the father of the nation, who brought an end to apartheid and delivered the nation from the brink of civil war.

Children carrying posters slowly march up and down Vilakazi street, where Mr Mandela's Soweto home is. Others are standing outside his old house, now turned into a museum.

There is an air of heaviness here - none of the loud hooting of minibus taxis that usually make up the energy of this busy street, no cars speeding down blaring loud music. Instead those not part of the mournful singing speak in hushed tones. Elderly women with walking sticks are part of the group that has come to send off the nation's icon.

The opening of a summit of African leaders in Paris to discuss security was dedicated to Mr Mandela, with many of those present paying tribute.

Flags are flying at half-mast on government buildings in Washington DC, Paris, across the UK and across South Africa. The European Union and world football body Fifa have also ordered their flags to be lowered.

In London, long queues formed outside the South African High Commission as people waited to sign a book of condolence.

Parliament in Pretoria is expected to hold a special joint session to reflect on Mr Mandela's life and legacy.

The BBC's Mike Wooldridge in Johannesburg says South Africa will never have seen a state funeral like it, with leaders, dignitaries and other admirers of the former president expected from all over the world.

It will be a huge logistical challenge, especially given the remoteness of Qunu, our correspondent adds.

Mr Mandela died shortly before 21:00 local time (19:00 GMT) on Thursday.

He won admiration around the world when he preached reconciliation after being freed from almost three decades of imprisonment.

He was awarded the Nobel Peace Prize in 1993 along with FW de Klerk, South Africa's last white president.

Mr de Klerk, who ordered Mr Mandela's release from jail, called him a "unifier" and said he had "a remarkable lack of bitterness".

Image caption
Many mourners have been singing traditional songs in Mr Mandela's memory

Image caption
An interfaith remembrance service in Cape Town drew hundreds of people

Image caption
Mr Mandela's death has been marked around the world with people leaving tributes such as this one in London

Mr Mandela had rarely been seen in public since officially retiring in 2004. He made his last public appearance in 2010, at the football World Cup in South Africa.

Roving diplomat

Born in 1918, Nelson Mandela joined the African National Congress (ANC) in 1943, as a law student.