Former South African president Nelson Mandela has undergone surgery to remove gallstones just days after receiving treatment for a lung infection.

Please wait while this video loads. If it doesn't load after a few seconds you may need to have Adobe Flash installed.

Nelson Mandela is recovering from an operation to remove gallstones, just days after receiving treatment for a lung infection.

Doctors treating the 94-year-old had to wait to perform the surgery, which has been described as "successful", because of the lung problem, presidential spokesman Mac Maharaj confirmed.

Endoscopic surgery requires a patient to take sedatives and then an anesthetic to allow a surgeon to put an tube down the throat. The surgeon can then remotely remove the gallstones which are small, crystal-like masses.

"The procedure was successful and Madiba is recovering," Maharaj said, using Mandela's clan name as many do in South Africa as a sign of respect. Patients sometimes need further surgery to have the gallbladder removed.

Mr Mandela, South Africa's first democratically-elected president, was admitted to a hospital in South Africa's capital, Pretoria on 8 December. At first, officials said Mandela was undergoing tests but later revealed he had been diagnosed with a lung infection.