Nelson Mandela is now back at home after almost three months in hospital, but his condition remains critical and difficult days lie ahead.
While life for Mandela and his family will be more comfortable at his upscale Johannesburg home, he is not out of danger.
South Africa's presidency, announcing his discharge from hospital, said he remains in a "critical" and "at times unstable" condition.
At home the former president will receive essentially the same intensive medical care as he did in hospital.
He will be treated by "a large medical team from the military, academia, private sector and other public health spheres," the government said.
His home has been reconfigured for the treatment.
"We can now provide the same level of care in homes," said Paris-based pulmonary specialist Bertrand Dautzenberg, citing advances in devices like respirators.
Often the decision to send a patient home is made because of a clinical improvement. But the aim can also be to make a still-struggling patient more comfortable.
"When a condition lasts a long time, sometimes physicians decide to send a patient home, even if he has not been stabilised, with the aim of encouraging healing, to provide palliative care, to make them more comfortable," Dautzenberg said.
Mandela has at times seemed to be in a dire condition since being admitted on June 8.
He was rushed to hospital in the middle of the night with what the government described as a lung infection, but which may well have been pneumonia.
In late June visitors reported he was on life support, unable to breathe for himself and had not opened his eyes for days.
Court documents filed by his family's lawyers went as far as to say that he was in a vegetative state and that doctors recommended his life support machine be turned off.
A close friend said that suggestion had been rejected by doctors, unless there was massive organ failure.
They were vindicated. The once spry boxer appeared to have at least one more fight left in him.
By early August, the South African government was reporting that Mandela was responding to treatment and his condition was steadily improving.
Since then he has at times been unstable, but medical interventions have stopped any further worsening of his condition.
The lung infection appeared to have been contained, although doctors were still draining fluid from the lungs.
This procedure may well have been linked to a plural effusion -- a build up of infected fluid around the lungs.
A large build-up, while sustaining infection, also makes it difficult to breathe.
Mandela now has a long history of pulmonary illness to overcome, and his advanced years will make that recovery even more difficult.
In 1988, while serving his 27-year prison term, Mandela was diagnosed with early stage tuberculosis.
Two litres of fluid were drained from his chest and he spent six weeks recuperating in hospital.
Four months later he had recovered and for more than a decade there was little sign of trouble, but in January 2011 a string of infections began.
Since then he has been hospitalised five times, treated for acute respiratory infections, gallstones, pneumonia, and once to receive a thorough check up.
Even amid the joy of his latest release, a sixth hospitalisation cannot be ruled out.
"If there are health conditions that warrant another admission to hospital in future, this will be done," the South African presidency said.
Doctors may simply have decided that come what may, Mandela would be happier at home and may stand a better chance of recovery.
"The fact of being in a somewhat normal environment is always positive for the patient," said Dautzenberg.