Former South African president Nelson Mandela has undergone a successful procedure to have gall stones removed.

He has been in hospital for a week with a lung infection.

"The former president underwent a procedure via endoscopy to have the gall stones removed ... The procedure was successful and Madiba is recovering," the government statement said.

Madiba is Mr Mandela’s clan name.

He was admitted to a Pretoria hospital on 8 December after being flown from his home village of Qunu in a remote, rural part of the Eastern Cape province.

Tests revealed a recurrence of a lung infection and that he had developed gallstones, the government statement said.

When he was admitted officials stressed there was no cause for concern although domestic media reports suggested senior members of the government and people close to him had been caught unawares.