President Barack Obama was among the scores of world leaders attending a memorial service Tuesday in South Africa honoring the life of Nelson Mandela, who is widely credited with ending apartheid.

The 95-year-old Mandela died last week at his home in Johannesburg, South Africa following a long illness.

Obama made a veiled reference to gay rights in addressing the tens of thousands who braved the rain to say farewell to South Africa's “greatest son.”

“The struggles that follow the victory of formal equality or universal franchise may not be as filled with drama and moral clarity as those that came before, but they are no less important,” Obama said. “For around the world today, we still see children suffering from hunger and disease. We still see run-down schools. We still see young people without prospects for the future. Around the world today, men and women are still imprisoned for their political beliefs, and are still persecuted for what they look like, and how they worship, and who they love. That is happening today.” (The video is embedded on this page. Visit our video library for more videos.)

Mandela is survived by his second wife, Winnie Madikizela-Mandela, three daughters, 17 grandchildren and 13 great-grandchildren.