By Marie-Louise Gumuchian
JOHANNESBURG (CNN) -- Presidents and prime ministers, celebrities and royals joined tens of thousands of South Africans to pay tribute to Nelson Mandela on Tuesday, in a memorial service celebrating a man seen as a global symbol of reconciliation.
In what has been billed as one of the largest gatherings of global leaders in recent history, world leaders from U.S. President Barack Obama to Cuba's Raul Castro gathered alongside street sweepers, actors and religious figures to pay tribute to the revered statesman who died last Thursday, aged 95.
Despite the pouring rain, the atmosphere inside Johannesburg 's FNB stadium was celebratory, with people dancing, blowing vuvuzela plastic horns and singing songs from the anti-apartheid struggle.
Around them, huge poster pictures of Mandela hung inside the stadium.
Many people carried banners honoring "Madiba," Mandela's traditional clan name. Others were draped in materials covered with his face or the green, yellow, black, red and blue colors of the South African flag.
Some had skipped work and lined up for hours to secure seats so that they could pay their respects at the stadium where Mandela delivered his first major speech after his release from 27 years in prison.
The four-hour service, coinciding with U.N. Human Rights Day, was the centerpiece of a week of mourning and was expected to bring much of South Africa to a stop.
It began with the national anthem before South Africa's presidents -- past and present -- were introduced. There was a loud cheer from the crowd for F.W. de Klerk, the last leader of white South Africa, who shared a Nobel Peace Prize with Mandela for helping to end apartheid.
The joyous cries died down as speeches from Mandela's family and friends, members of the African National Congress, as well as a fellow Robben Island prison inmate, began.
Anguished faces listened quietly as a sorrowful chant to "Tata Madiba" filled the air. "Tata" means "father" in Mandela's Xhosa tribe.
'The world has lost a beloved friend and mentor'
Mandela's gift for uniting foes across political and racial divides was still evident at the service.
Walking up the stairs onto the stage to deliver his speech, Obama shook hands with Castro, an unprecedented gesture between the leaders of two nations that have been at loggerheads for more than half a century.
Obama, who like Mandela was his nation's first black president, has cited Mandela as his own inspiration for entering politics.
"To the people of South Africa -- people of every race and every walk of life -- the world thanks you for sharing Nelson Mandela with us," he said, calling him a "giant of history."
To roaring applause, he said Mandela's death should prompt self-reflection.
"With honesty, regardless of our station or our circumstance, we must ask: How well have I applied his lessons in my own life?" Obama said.
"It is a question I ask myself -- as a man and as a president. We know that like South Africa, the United States had to overcome centuries of racial subjugation. As was true here, it took sacrifice -- the sacrifices of countless people, known and unknown -- to see the dawn of a new day."
The presidents of Brazil, Namibia, India, Cuba and South Africa were designated speakers.
"South Africa has lost a hero, they have lost a father. The world has lost a beloved friend and mentor," United Nations Secretary-General Ban Ki-moon said to loud cheers.
"Nelson Mandela was more than one of the greatest leaders of our time, he was one of the greatest teachers. And he taught by example."
The stadium, which can seat around 90,000 people, was not full, and speeches were hard to hear at times.
In the keynote speech, South African President Jacob Zuma hailed Mandela as a global icon.
"Everyone has had a Mandela moment when this world icon has touched their lives," he said.
"There is no one like Madiba. He was one of a kind."
Presidents and celebrities
Foreign guests included British Prime Minister David Cameron, the Prince of Wales, French President Francois Hollande and Liberian President Ellen Johnson Sirleaf.
Nobel Peace Prize laureate Archbishop Desmond Tutu and members of The Elders, a group of retired statesmen founded by Mandela and others, were also in attendance, including former U.N. Secretary-General Kofi Annan and former U.S. President Jimmy Carter.
The crowds cheered loudly and clapped as a huge screen showed famous faces.
The world of entertainment also was well represented, with South African actress Charlize Theron and U2's Bono in attendance. Celebrity guests also included Oprah Winfrey and Naomi Campbell.
Mandela's widow, Graca Machel, and his former wife Winnie Mandela embraced and kissed as they arrived.
Paying tribute to his uncle, Gen. Thanduxolo Mandela gave thanks for the outpouring of respect from around the world.
"This universal show of unity is a true reflection of all that Madiba stood for -- peace, justice, unity of all mankind," he said.
"Let us pledge to keep Madiba's dream alive."
With 91 heads of state attending, security was tight.
Working off plans developed for years in secret, the South African government planned to use an elite military task force, sniper teams and canine teams to help secure the stadium, CNN's Arwa Damon reported Monday. In addition, helicopters and military jets frequently fly overhead.
"Should anybody, anything dare to disturb or disrupt this period of mourning and finally taking and accompanying the former president to his last resting place, then that person will be dealt with," Brig. Gen. Xolani Mabanga said Monday.
South African officials wouldn't give details about their security plans -- how many police officers, how many troops, precautions to keep the stadium weapons- and explosives-free.
"But we can assure that all necessary steps have been taken, and that is why the leadership of the world and former leaders of the world have confidence to come to our country at this time to share with us this moment," said Minister in the Presidency Collins Chabane.
U.S. officials said they were satisfied with security arrangements.
The event rivaled other significant state funerals in recent decades, such as that of former British Prime Minister Winston Churchill in 1965 and the 2008 funeral of Pope John Paul II, which attracted some 2 million people to Rome -- among them four kings, five queens, at least 70 presidents and prime ministers and the leaders of 14 other faiths.
Security was also stepped up outside Mandela's home, where crowds showed up with umbrellas to show their appreciation for a man they said represented unity. Some even enjoyed the rain, jumping into puddles.
"We want to respect our father of the nation, our father of the country. That is why we left work to pay that respect to him," one South African told CNN.
State funeral on Sunday
While Tuesday's memorial is the first major event honoring Mandela since his death, it won't be the last.
A state funeral will be held Sunday in Mandela's ancestral hometown of Qunu in South Africa's Eastern Cape province.
Crews worked overtime Monday to prepare the stadium for the service.
The government set up overflow locations at stadiums and other facilities throughout the country.
With private vehicles banned from the area around the stadium, the government pressed buses from around the country into service and stepped up train service to move the crowds.
In Soweto township, where Mandela lived before he was imprisoned, people waited for three hours for buses to take them to the stadium. Unfazed by the wait, they sang and danced.
Out of the public eye, friends who had not seen each other in years have been coming together with Mandela's family in his home, said Zelda la Grange, Mandela's longtime personal assistant.
Mandela called la Grange his "rock," even though she seemed an unlikely confidante. She was a white Afrikaner and an employee of the former apartheid government.
In her first interview since Mandela's death, she described the mood in his home to CNN's Robyn Curnow on Monday.
"Obviously there's sadness in the house," she said, but also, "People are celebrating Madiba's life. They are grateful."
CNN's Michael Pearson, Athena Jones, Holly Yan, Chris Cuomo, Kim Norgaard, Robin Curnow, Arwa Damon and David McKenzie contributed to this report.
™ & © 2013 Cable News Network, Inc., a Time Warner Company. All rights reserved.