"We will never see the likes of Nelson Mandela again," Obama said during a 20-minute speech at Soweto's FNB stadium, where more than 100 world leaders are assembled for Mandela's memorial.
"He makes me want to be a better man," the president said as rain poured down on those in attendance. "He speaks to what's best inside of us. After this great liberator is laid to rest, and when we've returned to our cities and villages and rejoined our daily routines, let us search for his strength, let us search for his largeness of spirit somewhere inside of ourselves."
Prime Minister Stephen Harper and four former Canadian prime ministers are among the crowd 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.
Mandela's legacy of reconciliation seemed to have an effect at the memorial, as Obama shook the hand of Cuban President Raul Castro on his way to the podium.
UN Secretary General Ban Ki-moon also spoke in honour of Mandela, who died last week at age 95. He told the crowd that Mandela "is at rest, his long walk complete."
"Mr. Mandela was more than one of the greatest pillars of our time," the UN chief said. "He was one of our greatest teachers. He taught by example. He sacrificed so much ... for freedom and equality, for democracy and justice."
Much of the crowd was joyous and singing despite cold, driving rain falling on the globally televised event.
"Even though this is a memorial, really this is the funeral for the people; it's far from glum most places I have been to," CBC reporter Kim Brunhuber said from the city of Pretoria. "The mood has been far from sombre. It's felt more like a street party in some places more so than a funeral."
Matlhogonolo Mothoagae, a marketing student who arrived hours before the gates opened, said he would not have the life he has today if not for Mandela.
"He was jailed so we could have our freedom."
Rohan Laird, the 54-year-old CEO of a health insurance company, said 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, reflecting the enormous logistical challenge of organizing the memorial for Mandela, who died Dec. 5 in his Johannesburg home.
The rain appeared to keep the crowds away. The 95,000-seat stadium was about half full when the event began at noon local time, an hour late, with the national anthem.
Rain sent those who arrived early into the stadium's covered upper deck, and many of the lower seats were empty.
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.
CBC reporters in the stadium said the speakers were difficult for the crowd to hear over the stadium sound system, but they let their feelings known about various world leaders as they were shown on the giant screen.
Obama and his wife, Michelle, were met with cheers when he arrived late at the memorial. However, the crowd booed former U.S. president George W. Bush. South African President Jacob Zuma, who is to give the keynote address, has been booed twice by many of the stadium attendees.
5 Canadian prime ministers
Canada's official delegation arrived Monday morning. Harper, his wife Laureen and former prime ministers Jean Chrétien, Brian Mulroney, Kim Campbell and Joe Clark are at the memorial.
The other members of the Canadian delegation are:- Former governors general Adrienne Clarkson and Michaëlle Jean.
- Assembly of First Nations national Chief Shawn Atleo.
- Canada's high commissioner to South Africa, Gaston Barban, and his wife, Jane.
"We've been listening to the singing of tens of thousands who've gathered here," Atleo said from inside the stadium shortly before the memorial began. "It's a feeling of both sorrow and I think deep pride and the celebration of the life of an incredible man."
The Prime Minister's Office says Opposition Leader Tom Mulcair, as well as four provincial premiers and several MPs who travelled to South Africa, wouldn't be allowed into the Soweto stadium for the event. The decision was made last night by the South African protocol office, a Harper spokesman said. However, photos on Twitter showed that at least some of them had made it into the memorial.
Raul Castro among speakers
Other speakers were to include Castro and Chinese Vice-President Li Yuanchao.
Tuesday was the 20th anniversary of the day 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 soccer venue was also the spot where Mandela made his last public appearance at the closing ceremony of the 2010 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 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 eight-year-old for the three to five minutes we talked."