Former South African President Nelson Mandela has returned home in Johannesburg from a hospital where he spent 10 days under treatment for pneumonia, according to a statement from the office of the presidency.

It was his third trip to a hospital since December, when he was treated during a three-week stay for a lung infection and had a procedure to remove gallstones.

"[Mandela] has been discharged from hospital today, 6 April, following a sustained and gradual improvement in his general condition," the statement said on Saturday.

"The former president will now receive home-based high care."

Mandela had received similar treatment at his home after a hospital stay in December.

During Mandela's hospitalisation, doctors drained fluid from his lung area, making it easier for him to breathe.

Earlier in March, the anti-apartheid leader was admitted to hospital overnight for what authorities said was a successful scheduled medical test.

Mandela became South Africa's first black president in 1994 after elections were held, bringing an end to the system of white racist rule known as apartheid.

After his release from prison in 1990, Mandela was widely credited with averting even greater bloodshed by helping the country in the transition to democratic rule.

The Nobel Peace Prize laureate has been particularly vulnerable to respiratory problems since contracting tuberculosis during his 27-year imprisonment for fighting white racist rule in his country.

South African officials have said doctors were acting with extreme caution because of Mandela's advanced age.

In Saturday's statement, Zuma thanked the medical team and hospital staff that looked after Mandela and expressed gratitude for South Africans and people around the world who had shown support for Mandela.