Photo gallery of a memorial service for former South African President Nelson Mandela in Johannesburg.
Some of the crowd arrived early for the service and waited for hours to get into the stadium, singing and dancing.
The Danish PM Helle Thorning Schmidt found time to snap a selfie with President Obama and David Cameron!
Pictures of Mandela were everywhere, on banners, flags and even face paint.
Tens of thousands of people joined world leaders at a memorial service for the former South African President Nelson Mandela in Johannesburg, South Africa. The service was held at the FNB stadium, where Mandela made his last public appearance in 2010. Even in heavy rain, the crowds were in high spirits - singing and dancing and stomping their feet.
Nelson Mandela, 1918-2013.
A man posed with his home-made hat as he arrived at the stadium.
The former South African president died aged 95 last Thursday and the country is holding a number of remembrance events leading up to the funeral, which is being held on Sunday.
The ceremony was broadcast across the world, with many in South Africa tuning in.
For some the long wait was too much: this boy fell asleep in his mother's lap.
Those attending the service sang songs from the fight against apartheid - the racist way South Africa was ruled through most of the 20th century.
Flags and banners were waved as the memorial started.
There was heavy rain throughout the service. The deputy president of the African National Congress, Cyril Ramaphosa welcomed the crowd and said: "In our tradition, when it rains when you are buried, your gods are welcoming you to heaven."
Outside the stadium a man prepared to sell portraits of Mandela.
President Obama was welcomed by a huge cheer from the crowd as he began his speech. He described Mandela as a "giant of history", and said: "The world thanks you for sharing Nelson Mandela with us."
A man reacts to the words of US President Barack Obama during the service.
A boy with Rest In Peace Nelson Mandela painted on his face looks up to the skies during the memorial service.
Nelson Mandela's wife, Graca Machel greeted US President Barack Obama.
The atmosphere inside the stadium was one of joy and celebration.