JOHANNESBURG

- Amid cheers and song for the prisoner who became peacemaker, President Obama energized tens of thousands of spectators and nearly 100 visiting heads of state yesterday 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 '80s. 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 age 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."

Mandela's body will lie in state for three days, before burial Sunday.