Nelson Mandela has left hospital after a 10-day stay during which the anti-apartheid icon was treated for pneumonia and will now receive "high care" at home, the South African government said.
His release was decided "following a sustained and gradual improvement in his general condition," presidency spokesman Mac Maharaj said in a statement Saturday.
An ambulance and black security vehicle arrived at the Johannesburg home of the frail 94-year-old, where the government said the former president will continue to receive "high care".
Mandela was rushed to an undisclosed hospital on March 27, suffering from a recurrence of a lung infection.
Doctors, who later said the infection was pneumonia, drained a build-up of fluid, known as a pleural effusion or "water on the lungs", that had developed.
His discharge from hospital would bring relief to millions of South Africans who regard him as the father of democracy in their country.
South African President Jacob Zuma on Saturday extended his gratitude to his compatriots, the hospital staff and people around the world for their support.
"President Zuma thanks the hard-working medical team and hospital staff for looking after Madiba so efficiently," a presidency statement said, using Mandela's clan name.
It was the third time in five months that Mandela has been hospitalised.
Last month he was admitted for a night for a scheduled check-up and in December he was hospitalised for 18 days for a lung infection and gallstones surgery.
That stint was his longest since he walked free from 27 years in prison in 1990.
The Nobel Peace Prize winner has had longstanding lung problems.
In 1988, while serving a prison term for his anti-apartheid actions, Mandela was admitted to hospital in Stellenbosch with a bad cough and weakness and having complained of dampness in his cell.
He was diagnosed with early stage tuberculosis.
Since then, amid repeated health scares, South Africans have come to accept their ageing icon's mortality.
Mandela is idolised in his home nation, where he is seen as the architect of the country's peaceful transition from racialist police state to hope-filled democracy.
Nearly 20 years after he came to power as the first black president Mandela remains the unifying symbol in a country that is still riven by racial tensions and deep inequality.
Recent labour unrest, high-profile crimes, grinding poverty and corruption scandals have effectively ended the honeymoon enjoyed after Mandela ushered in the "Rainbow Nation."
The latest hospitalisation was greeted with mournful acceptance and wishes that "Madiba" -- as he is affectionately called -- would be as comfortable as possible, whatever his fate.
The news was also greeted by best wishes from around the world, including US President Barack Obama, who described Mandela as "a hero."
While Mandela the symbol bestrides South African politics, the man has long since left the political stage and for many of the country's large young population he is a figure from another era.
He has not appeared in public since South Africa's football World Cup final in 2010, six years after retiring from public life.
Still, his nearly life-long struggle against apartheid resonates.