Nelson Mandela has been discharged from hospital after a 10-day stay during which the 94-year-old anti-apartheid icon was treated for pneumonia.
His release was decided "following a sustained and gradual improvement in his general condition,'' presidency spokesman Mac Maharaj said in a statement.
Shortly after, an ambulance and security vehicle arrived at the Johannesburg home of the frail former president, where the government said he will continue to receive "high care''.
Mandela was rushed to hospital before midnight 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 release will come as a relief to millions of South Africans who regard him as the father of democracy in their country.
It was the third time in five months that the former president 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 jail in 1990.
The Nobel Peace Prize winner has had longstanding lung problems.
In 1988, while serving his prison term, 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 he remains the unifying symbol in a country that is still riven by racial tensions and deep inequality.
The latest hospitalisation was greeted with mournful acceptance and wishes that "Madiba'' as he is affectionately known 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''.
South African President Jacob Zuma on Saturday extended his gratitude to his compatriots and people around the world for their support.