JOHANNESBURG (AP) - Amid cheers and song for the prisoner who became peacemaker, President Barack Obama energized tens of thousands of spectators and nearly 100 visiting heads of state Tuesday with a plea for the world to emulate Nelson Mandela, "the last great liberator of the 20th century."
Obama's eulogy was the rhetorical highlight of a memorial service in which South Africans celebrated Mandela's life with singing and dancing, often during dignitaries' speeches. They also booed their own president and were chided by a top government official who said: "Let's not embarrass ourselves."
Lashing rain lent a freewheeling aspect to the memorial, with people taking shelter in the stadium's wide hallways, where they sang anti-apartheid anthems from the 1970s and 1980s. Foul weather kept many away, and the 95,000-capacity stadium was only two-thirds full.
Obama implored people to embrace Mandela's universal message of peace and justice, comparing the South African leader to Mahatma Gandhi, Martin Luther King Jr. and Abraham Lincoln. Mandela spent 27 years in prison under a racist regime, and promoted forgiveness and reconciliation when he was finally freed.
"We will never see the likes of Nelson Mandela again," Obama said. "But let me say to the young people of Africa, and young people around the world - you can make his life's work your own."
He hailed Mandela, who died Thursday at 95, as the unlikely leader of a movement that gave "potent voice to the claims of the oppressed and the moral necessity of racial justice. "
"Born during World War I, far from the corridors of power, a boy raised herding cattle and tutored by the elders of his Thembu tribe, Madiba would emerge as the last great liberator of the 20th century," Obama said, referring to Mandela by his clan name.
Obama, who like Mandela became the first black president of his country, said he was inspired by Mandela as a student. The speech was greeted with thunderous applause, and many heads of state and other foreign dignitaries gave a standing ovation.
Obama pointed out that "around the world today, men and women are still imprisoned for their political beliefs, and are still persecuted for what they look like, or how they worship, or who they love."
Among the heads of state and government were some from countries like Cuba that don't hold fully democratic elections. On the way to the podium, Obama shook hands with Cuban President Raul Castro, underscoring a recent warming of relations between their countries.
Other attending leaders criticized for their human rights records were Zimbabwe's Robert Mugabe, Equatorial Guinea's Teodoro Obiang Nguema and Gambia's Yahya Jammeh.
In contrast to the wild applause given to Obama, South African President Jacob Zuma was booed. Many South Africans are unhappy with Zuma because of state corruption scandals, though his ruling African National Congress, once led by Mandela, remains the front-runner ahead of elections next year.
Mandela's record after he was elected in the first all-race elections in 1994 has faced some criticism, most of it indirect because he is such a revered figure.
He did not push for major restructuring of the economy, fearing it could alienate whites who still control most of South African industry. Today, the country struggles with economic inequality, though Mandela's moral stature sets him far apart from his successors.
A dazzling mix of royalty, statesmen and celebrities was in attendance.
Thabo Mbeki, who succeeded Mandela as president, got a rousing cheer as he entered the stands. French President Francois Hollande and his predecessor and rival, Nicolas Sarkozy, arrived together. U.N. Secretary-General Ban Ki-moon waved and bowed to spectators.
Mandela's widow, Graca Machel, and his former wife, Winnie Madikizela-Mandela, gave each other a long hug before the ceremonies began.
Actress Charlize Theron, model Naomi Campbell and singer Bono were among the celebrities paying final tribute.
Symbolically, 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. De Klerk, a political rival who became friends with Mandela, was also in the stadium.
The rain was seen as a blessing among many of South Africa's majority black population.
After Tuesday's memorial, Mandela's 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.