Nelson Mandela was discharged from hospital Saturday after a 10-day stay during which the 94-year-old anti-apartheid icon was treated for pneumonia, 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.
Shortly later, an ambulance and black 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 twenty years after he came to power he 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 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.
"President Zuma thanks the hard-working medical team and hospital staff for looking after Madiba so efficiently," he said, using Mandela's clan name.
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.