Nelson Mandela rests at home after hospital treatment
Former South African President Nelson Mandela is recovering at home after spending two nights in hospital with a respiratory infection.
Doctors say he responded well to treatment and his condition is stable.
The 92-year-old is still being monitored by medical staff at his home in Johannesburg.
Mr Mandela was a political prisoner for 27 years but emerged to become the country's first black president and lead a process of reconciliation.
He contracted tuberculosis in 1988 while in jail on Robben Island and also had a respiratory infection eight years ago.
Officials say despite Mr Mandela's condition in hospital, he joked with staff and visitors.
"His amazing positive attitude allows him to cope with the difficulties of old age with the greatest of grace," said Dr Vejaynand Ramlakan, who leads the team of military doctors assigned to care for him.
South Africa's liberation hero flew from Cape Town to Johannesburg on Wednesday for a check-up.
But concerns mounted and media speculation grew as he remained in hospital, and was visited by a string of high-profile figures, while little information was made available.
South Africa's Deputy President Kgalema Motlanthe admitted that communications over the health of the man affectionately known by his clan name "Madiba" could have been better.
"Madiba has received similar checkups in the past and it's never raised the same public panic it has now", Mr Motlanthe said, explaining why officials had not been prepared for the level of interest.
The BBC's Pumza Fihlani in Johannesburg says the news that Mr Mandela had been discharged came as a relief to many.
Lerato Ledwaba, a 20-year-old university student, told the BBC: "As a young person in South Africa, Madiba means the world to me - he is my inspiration to strive for a better life for myself."
"He is old but we are not ready to lose him. I don't know if we'll ever have another leader like him," said another Johannesburg resident Karen van Rensburg, 50.
Mr Mandela retired from public life in 2004 and has made very few public appearances in recent years.
On Friday only a brief view of his head covered by a surgical cap was visible as he was wheeled into an ambulance.
The former president is also a hugely iconic figure beyond South Africa and officials said that his office had received more than 10,000 messages of support, including from US President Barack Obama.