JOHANNESBURG -- President Barack Obama's eulogy was for Nelson Mandela, but it laid out for a global audience the work that Obama himself would like to be remembered for: an unending fight against injustice and inequality. Obama acknowledged he sometimes wonders whether he is doing enough to live up to Mandela's historic legacy.
Speaking to a crowd of thousands at a rain-soaked memorial service -- and millions more on television -- Obama said it was crucial that progress in the U.S. and South Africa not "cloud the fact that our work is not yet done." He said that struggles to come "may not be as filled with drama and moral clarity as those that came before, but they are no less important."
Behind Obama's words was the difficult political reality he and Mandela both faced. They became their nations' first black presidents, shattering racial barriers that once seemed impossible to break. But their groundbreaking electoral success came with sky-high expectations that proved difficult to fulfill, on problems like poverty and injustice.
For Obama, Tuesday's focus on global inequality dovetailed with an agenda he is trying to revive in the U.S., as he seeks to steady his standing with middle class Americans after a trying presidential year. Obama's renewed attention to the issue of income inequality in particular is popular with his liberal base, though he stands little chance of gaining support for items such as a minimum wage increase from congressional Republicans.
"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 of Mandela. "It's a question I ask myself, as a man and as president."
While Obama may be facing political troubles at home, his broad popularity in South Africa was on full display. The crowd at the Johannesburg soccer stadium erupted in applause each time the American president's name was mentioned or his image flashed on the stadium screen.
In small but significant ways, Obama also appeared to be trying to live Mandela's message of overcoming animosity and bitterness.
He shared a brief handshake with Cuban President Raul Castro, who attended the service. It was a rare greeting between the leaders of two countries that have long been at odds, and the simple gesture stoked talk of a possible rapprochement.
But just moments later, Obama launched into veiled criticism of Cuba and other authoritarian governments that were friendly with Mandela.
"There are too many people who happily embrace Madiba's legacy of racial reconciliation but passionately resist even modest reforms that would challenge chronic poverty and growing inequality," Obama said, referring to Mandela by his clan name. "There are too many leaders who claim solidarity with Madiba's struggle for freedom but do not tolerate dissent from their own people."
The White House said Obama met with members of Mandela's family during the memorial service, including Mandela's widow, Graca Machel, and expressed condolences on behalf of the American people. Obama and first lady Michelle Obama also called Archbishop Desmond Tutu of South Africa from their hotel after the service to thank the retired Anglican bishop for his anti-apartheid work.
By the time Obama became president, Mandela had largely retired from public life. The two men held just one in-person meeting in 2005 and spoke only occasionally by phone.
Tuesday's memorial service served as a reunion of nearly all living American presidents. George W. Bush joined Obama on Air Force One for the trip to South Africa. Former Presidents Bill Clinton and Jimmy Carter also attended the service, but traveled separately.
George H.W. Bush was the only former president who did not attend. A spokesman for the 89-year-old said he regretted missing the event but is no longer able to travel long distances.