The crowds twice booed South African President Jacob Zuma, who was to give the keynote address at the service, which started an hour late.
Crowds converged on FNB Stadium in Soweto, the Johannesburg township that was a stronghold of support for the anti-apartheid struggle that Mandela embodied as a prisoner of white rule for 27 years and then during a peril-fraught transition to the all-race elections that made him president.
Steady rain kept many people away. Shortly before the start of the ceremony, the 95,000-capacity stadium was about 50 per cent full. The ceremony began at noon local time with the singing of the national anthem.
The mood, though, was celebratory. A dazzling mix of royalty, statesmen and celebrities was in attendance.
Thabo Mbeki, the former South African president who succeeded Mandela, got a rousing cheer as he entered the stands. French President Francois Hollande and his predecessor and political rival, Nicolas Sarkozy, arrived together. United Nations Secretary-General Ban Ki-moon waved and bowed to spectators who sang praise for Mandela, seen by many South Africans as the father of the nation.
"I would not have the life I have today if it was not for him," said Matlhogonolo Mothoagae, a postgraduate marketing student who arrived hours before the stadium gates opened. "He was jailed so we could have our freedom."
Rohan Laird, the 54-year-old CEO of a health insurance company, said in the stadium that he grew up during white rule in a "privileged position" as a white South African and that Mandela helped whites work through a burden of guilt.
"His reconciliation allowed whites to be released themselves," Lair said. "I honestly don't think the world will see another leader like Nelson Mandela."
Workers were still welding at a VIP area as the first spectators arrived amid an enormous logistical challenge of organizing the memorial for Mandela, who died Dec. 5 in his Johannesburg home at the age of 95.
United States President Barack Obama landed in South Africa early Tuesday. Besides Obama, eulogies were to be delivered by U.N. chief Ban, Chinese Vice-President Li Yuanchao and Cuban President Raul Castro.
Other speakers include the presidents of Brazil, Namibia and India, as well as tributes from Mandela's grandchildren.
Mandela's widow, Graca Machel, and former wife Winnie Madikizela-Mandela were at the stadium. So were actress Charlize Theron, model Naomi Campbell and singer Bono.
Tuesday was the 20th anniversary of the day when Mandela and South Africa's last apartheid-era president, F.W. de Klerk, received the Nobel Peace Prize for their efforts to bring peace to their country.
Mandela said in his acceptance speech at the time: "We live with the hope that as she battles to remake herself, South Africa will be like a microcosm of the new world that is striving to be born."
The sounds of horns and cheering filled the stadium ahead of the ceremony. The rain, seen as a blessing among South Africa's majority black population, enthused the crowd.
"In our culture the rain is a blessing," said Harry Tshabalala, a driver for the justice ministry. "Only great, great people are memorialized with it. Rain is life. This is perfect weather for us on this occasion."
People blew on vuvuzelas, the plastic horn that was widely used during the World Cup soccer tournament in 2010, and sang songs from the era of the anti-apartheid struggle decades ago.
"It is a moment of sadness celebrated by song and dance, which is what we South Africans do," said Xolisa Madywabe, CEO of a South African investment firm.
The soccer venue was also the spot where Mandela made his last public appearance at the closing ceremony of the World Cup. After the memorial, his body will lie in state for three days at the Union Buildings in Pretoria, once the seat of white power, before burial Sunday in his rural childhood village of Qunu in Eastern Cape Province.
Police promised tight security, locking down roads kilometres (miles) around the stadium. However, the first crowds entered the stadium without being searched.
John Allen, a 48-year-old pastor from the U.S. state of Arkansas, said he once met Mandela at a shopping centre in South Africa with his sons.
"He joked with my youngest and asked if he had voted for Bill Clinton," Allen said. "He just zeroed in on my 8-year-old for the three to five minutes we talked."
Follow Jon Gambrell on Twitter at www.twitter.com/jongambrellAP.
Follow Alan Clendenning on Twitter at www.twitter.com/alanclendenning.
Also on HuffPost