JOHANNESBURG — President Obama eulogized Nelson Mandela as "the last great liberator of the 20th Century'' as tens of thousands of South Africans, joyously cheering and singing despite a cold rain, mourned the passing and celebrated the life of the father of their modern nation.
Obama, speaking in an open soccer stadium and before a gathering of global leaders, likened Mandela to historic giants of the past century, such as Mahatma Gandhi and Martin Luther King Jr., and said that like them Mandela willingly "suffered the consequences of his actions'' in standing up to powerful oppressors.
STORY: Nelson Mandela dead at 95
"We will never see the likes of Nelson Mandela again,'' said Obama, who has long regarded Mandela as an inspiration.
"He tells us what is possible not just in the pages of history books but in our own lives as well,'' the president said.
Before addressing the large but not full stadium crowd, Obama paused to shake hands with Cuban President Raul Castro, whose nation has long been at odds with the United States. He also shook hands with F.W. de Klerk, the last president of South Africa under the minority white apartheid government who shared in the Nobel Prize with Mandela.
Extreme levels of security were in place at FNB Stadium on the edge of the black township of Sowet for the memorial ceremony for the nation's first black president, Nobel Prize winner and leader of his nation's struggle to establish democracy.
"We are saying goodbye today to the person who died for us," said Rebecca Brown, 41. "We have to pay our last respects to Tata (father) and say thanks for everything. We will take it from here."
The ceremony began an hour late in a cold, driving rain, the stadium not full but thousands still streaming in.
Planners anticipated overflow crowds and set up other locations around the city where people could watch the memorial on large video screens. The government opened turnstiles to provide free subway and commuter trains to the memorial and banned traffic and parking near the stadium.
RELATED: Why Nelson Mandela is called Madiba
Rail workers in yellow jackets directed crowds onto trains, which were filled with South Africans eager to celebrate the life of Madiba, as they know him, as well as mourn his passing at age 95 last Thursday.
They were celebrating their own liberation too, more than two decades after the fall of the white minority apartheid regime.
In a bit of historical coincidence, Mandela's memorial came on the date when 20 years earlier he accepted the Nobel Peace Prize, along with de Klerk, for their leadership in bringing a peaceful transition to democracy in the majority black nation.
Inside the wet stadium, the crowd erupted in cheers at the arrival of Mandela's widow Graca Machel. Celebreties such as Bono of the band U2 made quieter arrivals. Seated near Machel was Mandela's ex-wife Winnie.
The nation's president, Jacob Zuma, a featured speaker, drew some boos from the crowd.
Arriving train passengers sang liberation songs from the anti-apartheid struggles of the 1980s, 1970s and earlier, which today are taught in South African schools. The crowds cheered and stomped feet so vigorously the rail cars bounced.
"We're probably going to be the most united we've ever been this week., which was his dream,'' said John Thomas, senior pastor at King of Kings Church, Cape Town, who was riding the train to FNB stadium.
"The mood of the country is his dream. Everyone now has dignity and freedom,'' the pastor said.
Crowds began entering the stadium at 6 a.m., five hours ahead of the scheduled start. Rain sent many into the stadium's covered upper deck areas.
Many were decked out in the colors of the African National Congress, which Mandela once led. There were boos when an image of a rival black nationalist group, the Economic Freedom Fighters, appeared on Jumbotron screens inside the stadium.
While rain failed to dampen enthusiasm, it slowed transport and likely discouraged some from attending.
"This is such a great moment for us considering our history and where we've come from," said Lesley Lesele, 41, who sought shelter from the rain inside the stadium.
As crowds waited, many waved huge South African flags. Blacks and whites hugged in the spirit of reconciliation while some chanted "Mandela yo. My president. "
The 95,000-capacity soccer venue was where Mandela made his last public appearance at the closing ceremony of the 2010 World Cup soccer games, and where he spoke in 1990 after his release from 27 years in prison. The stadium is on the edge of Soweto, a township within Johannesburg that was established for black mine workers and has grown in size to more than 1.2 million residents.
Security was the tightest ever seen in this country, The Times newspaper of Johannesburg reported, as 70 or more presidents, prime ministers and royalty from around the globe were present.
There was some delicate diplomatic footwork in place as well, as protocol officers timed the memorial service carefully to keep feuding leaders from being seated alongside each other or other potentially embarrassing encounters. Cuban leader Raul Castro was being kept apart from Obama, for example, and Zimbabwean President Robert Mugabe was being placed away from British Prime Minister David Cameron and his predecessor, Tony Blair.
Kirsten Thomson, 38, and her friend Leyya Nihal, 41, traveling by train from the wealthy section of Sandton, said they were witnessing history and celebrating the life of the man they said gave the country its freedom. "South Africans tend to mourn in communities" Nihal said,.
Mandela, who endured 27 years of imprisonment by the white regime before his release in 1990, led a movement that dismantled the racist system after decades of struggle.
Apartheid denied majority blacks and other people of color the most basic rights as citizens, separated families and consigned them to poverty and hard labor at the margins of society, despite their overwhelming numbers.
Thomas, the white pastor from Cape Town, said he runs an AIDS/HIV clinic called Living Hope that was first funded 12 years ago with U.S. aid directed by the George W. Bush administration to combat the disease that wreaked havoc on the African continent. He said success of his abstinence-based program had contributed to a decline in new infections among the 15 to 19 year old age group from 23% annually to 5.4%.
"It's a value-based program,'' he said. "We teach them that you are a valuable person made by God.''
After the memorial, Mandela's body will lie in state for three days at Pretoria, once the seat of white power, before a funeral and burial Sunday in his rural childhood village of Qunu in Eastern Cape Province.
Contributing: William Dermody