South Africa's first black president, Nelson Mandela, has had an operation to remove gallstones, according to a government statement.
The operation was successful and Mr Mandela is recovering.
Mr Mandela, who is 94, was admitted to hospital last Saturday after suffering a recurrence of a lung infection.
Tests revealed the presence of gallstones and doctors treating Mr Mandela decided to remove them once he had recovered from the infection.
The statement said: "This morning, 15 December 2012, the former president underwent a procedure via endoscopy to have the gall stones removed. The procedure was successful and (Mr Mandela) is recovering."
A gallstone is an accumulation of crystals in the gall bladder. If left untreated, it can become life-threatening because of the risks of secondary infections such as pancreatitis.
Mr Mandela is regarded by most South Africans as the father of the nation, having inspired them to fight for democracy.
He led the struggle against white-minority rule before being elected the first black president in 1994.
Despite being imprisoned for 27 years by the apartheid government, he forgave his former enemies and urged South Africans of all races to work together and seek reconciliation.
He was awarded the Nobel Peace Prize in 1993.