JOHANNESBURG, South Africa — The hundreds of young South Africans had come to hear President Obama talk about their future, but first he wanted to address the past.
On a stage at a university in Soweto, Obama recalled the anti-apartheid student protests in the township three decades earlier, when a black youth was killed by police. Then the president hailed the lessons of Nelson Mandela, the anti-apartheid icon who lay seriously ill in a hospital.
“As you go forward, I want you to think about the man in our prayers today,” Obama said. “Think of the 27 years in prison, the hardship and struggles. . . . In your lives, there are times that will test your faith. Don’t lose those qualities of your youth: your imagination, your optimism, your idealism.”
Obama has said that Mandela and the apartheid struggle inspired him to take his first steps into political activism as a 19-year-old college student in 1980. Now America’s first black president has been coming to terms with the impending death of the man he has called his hero, visiting the places and people closest to Mandela’s life.
Obama’s visit to a place of personal resonance came during one of the most politically challenging times in his presidency, as he struggles to advance his second-term policy agenda and grapples with a series of controversies that have buffeted his administration. His bid to build political momentum, which includes his trip to three African nations to reaffirm the U.S. commitment to the continent, has largely been overshadowed by Mandela’s health.
At times, Obama has sounded a bit like Mandela, drawing a subtle parallel between the elder statesman’s achievements and his own evolving legacy. Asked at a news conference here Saturday about his politically treacherous push for immigration changes back home, Obama responded: “One thing I know about why the United States is admired around the world is that people do recognize that America is a nation of immigrants, that, like South Africa, it is a multiracial and multicultural nation. And that makes us stronger.”
Though Mandela’s condition prevented the two from meeting, Obama visited privately with members of Mandela’s family on Saturday at the Centre of Memory, an organization to advance his causes.
On Sunday, the president will tour Robben Island, where Mandela spent decades as a political prisoner before being released in 1990. And he will deliver a speech at Cape Town University, which aides said would again pay homage to Mandela in Obama’s push for democratic values in a fast-changing continent. He will also visit Tanzania before returning home.
Here in South Africa, the president’s visit is taking place against a backdrop of messy political and family sagas involving Mandela’s legacy and how he will spend his last days.
The ruling African National Congress has been accused of seeking political currency from the grief surrounding his illness. With presidential and provincial elections coming next year, the party has sent hundreds of its supporters to sing praises outside Mandela’s hospital in the administrative capital, Pretoria.
Party leaders, including South Africa President Jacob Zuma, have sought to stage-manage Mandela’s final days, ordering supporters to attend prayer sessions and controlling information about his condition.
Mandela’s family, meanwhile, has been embroiled in a feud over where and with whom he is to be buried, underscoring the long-standing rifts within his large family.
At a welcome dinner for the president and first lady Michelle Obama, Zuma called for a moment of silence for Mandela in the grand dining hall of the presidential guesthouse.
Obama — who wrote in his 1995 book, “Dreams From My Father,” that Mandela, from afar, was one of his male role models in the absence of his own father — has had to negotiate a fine line between paying homage to Mandela and potentially appearing crassly political.
The two men met in 2005, when Obama was an up-and-coming senator and Mandela already was in declining health.
Though Obama said Friday aboard Air Force One that he did not need a “photo op” with Mandela to complete his trip, a White House staff photographer released a private photo Saturday of the president and first lady speaking with Mandela’s wife, Graca Machel, through a speakerphone.
Machel said later that she drew strength from the call and that the Obama family’s solidarity has “added a touch of personal warmth that is characteristic of the Obama family.”
But it was onstage at the university in Soweto, before a crowd of 650 young people and thousands more watching across the continent on a live broadcast, that Obama was perhaps most eager to share his thoughts about Mandela.
Like most parts of sub-Saharan Africa, youths here face severe challenges, with an unemployment rate of 71 percent for those between 14 and 34 and a low-rated education system. Part of the reasons for such a dismal assessment is the legacy of apartheid. When the African National Congress took power in 1994, with Mandela as the nation’s first black president, a third of the population was illiterate and 2 million children did not even attend school.
Today, nearly every child is enrolled in some form of school, but their development continues to be hampered by poor governance and a culture of corruption where jobs are handed out to those who are politically connected.
Soweto, in many ways, embodies the struggle of South Africa’s youth. During the 1976 uprising there, a 13-year-old student named Hector Pieterson was killed when police opened fire on thousands of students who were peacefully protesting the imposition of the Afrikaans language in the school curriculum.
That day, June 16, swiftly became representative of the brutality of the apartheid regime, and it is now commemorated each year as National Youth Day.
Onstage, Obama told the young people that Mandela had reflected on his own dark moments on Robben Island and “refused to give up.”
Quoting a passage from the iconic leader’s writings, the president said: “I am fundamentally an optimist. Whether that comes from nature or nurture, I cannot say. Part of being optimistic is keeping one’s head pointed towards the sun, one’s feet moving forward.”