Former South African president Nelson Mandela has been discharged from hospital but his condition "remains critical and is at times unstable", the country's government has announced.
President Jacob Zuma's office said the government would like to wish Mr Mandela "all the best" as he continues his recovery at his Johannesburg home.
In a statement, the government said: "Madiba's condition remains critical and is at times unstable. Nevertheless, his team of doctors are convinced that he will receive the same level of intensive care at his Houghton home that he received in Pretoria.
"His home has been reconfigured to allow him to receive intensive care there. The health care personnel providing care at his home are the very same who provided care to him in hospital. If there are health conditions that warrant another admission to hospital in future, this will be done."
Mr Mandela, who was jailed for 27 years during white minority rule, was taken to hospital on June 8 for a recurring lung infection.
Mr Zuma's office said the former president's condition has "vacillated between serious to critical and at times unstable" during his hospital stay.
The statement said: "He has received full medical support and continues to do so. He has also received visits from family, friends and colleagues. Despite the difficulties imposed by his various illnesses, he, as always, displays immense grace and fortitude."
The government said Mr Mandela has been treated by a large medical team from the military, academia, private sector and other public health spheres.
"We thank all the health professionals at the hospital for their dedication. Most media have also been notably responsible and we thank them also for the maturity and understanding that all have in general displayed," the statement went on.
The government called on all to allow Mr Mandela and his family "the necessary private space so that his continuing care can proceed with dignity and without unnecessary intrusion".