President Obama reflected on the legacy of former South African president Nelson Mandela, who died Thursday at 95. (The Washington Post)

Entering his sophomore year at Occidental College, Barack Obama sought a political movement to match his personal awakening, which he signaled to friends and family at the time by reclaiming his African first name.

Barry became Barack that year. He had read Du Bois, Fanon, Malcolm X — an array of authors writing about the black struggle for liberation in his country and in others shaking off the legacy of colonial rule around the world.

That is where he looked for — and found — a figure and a cause to channel his rising political enthusiasm: Nelson Mandela, then imprisoned on a lonely island off Cape Town, and his outlawed African National Congress. Obama would help lead the student push for the Southern California college to divest from companies doing business in apartheid South Africa.

“As the months passed I found myself drawn into a larger role — contacting representatives of the African National Congress to speak on campus, drafting letters to the faculty, printing up flyers, arguing strategy — I noticed that people had begun to listen to my opinions,” Obama wrote in his memoir, “Dreams From My Father.” “It was a discovery that made me hungry for words.”

Thirty-three years later, Barack Obama, elected twice to his nation's highest office, memorialized Mandela from behind a podium far from those heady student-led strategy sessions at Occidental.

In a statement he delivered Thursday evening with halting emotion in the White House Briefing Room, Obama called his participation in the divestment movement “my very first political action, the very first thing I ever did that involved an issue or a policy or politics.”

And he located the very start of his long walk to the Oval Office — through Columbia University and Harvard Law, through Chicago’s South Side and Springfield — in the inspiration set by Mandela, the prisoner-turned-president of a nation ruled for generations by a white minority.

“I cannot fully imagine my own life without the example that Nelson Mandela set,” Obama said. “And so long as I live I will do what I can to learn from him.”

The two men were born half a world and four decades apart. Obama’s birth came a year before the start of Mandela’s nearly 30-year imprisonment. And their achievements are far different in scale, even if the outlines of their lives trace similar lines.

Mandela became one of his country’s first black lawyers, while Obama, decades later, became the first black president of the Harvard Law Review.

After negotiating the end of apartheid, Mandela was elected the first black president of South Africa. Obama became the first black president of his country a century and a half after the end of slavery.

Mandela shared the Nobel Peace Prize in 1993 for helping ensure a democratic transition through a plea for racial forgiveness. Obama was awarded the same prize 16 years later, acknowledging in his Nobel Lecture that “compared to some of the giants of history who’ve received this prize — Schweitzer and King; Marshall and Mandela — my accomplishments are slight.”

Obama never met with Mandela as president. Out of respect for a frail Mandela, he avoided his sickbed during a summer stop in South Africa earlier this year. His homage came tacitly, during a visit, accompanied by his family, to the damp cells on Robben Island where Mandela spent nearly two decades.

In the guest book, Obama wrote, “We’re deeply humbled to stand where men of such courage faced down injustice and refused to yield. The world is grateful for the heroes of Robben Island, who remind us that no shackles or cells can match the strength of the human spirit.”

Obama did meet Mandela as a U.S. senator in Washington in 2005 and kept a photograph commemorating the encounter in his Capitol Hill office. Last month, Obama screened “Mandela: Long Walk to Freedom,” the new film based on Mandela’s 1994 biography, at the White House.

Mandela spoke of Obama as an example of American resilience and, as the son of a Kenyan, a symbol of possibility for many on his continent.

In a letter to Obama delivered on the day of his January 2009 inauguration, Mandela described the new president as “something truly historic not only in the political annals of your great nation, the United States of America, but of the world.”

“We are in some ways reminded today of the excitement and enthusiasm in our own country at the time of our transition to democracy,” Mandela wrote. “People, not only in our country but around the world, were inspired to believe that through common human effort injustice can be overcome and that together a better life for all can be achieved.”

Like Mandela’s election in South Africa, Obama’s first election here frightened a portion of the country. As president, he has sought to make clear that his race is not a factor in his policy decisions.

That has disappointed some African Americans, who believed that his election might bring special attention to the problems they face. Obama, in an echo of Mandela’s post-apartheid message, has said he is a president for all Americans.

At a politically challenging time in his own presidency, Obama received word of Mandela’s death at 5 p.m. Less than half an hour later, he stood before cameras to pay tribute, as much of the world did, to the man who gave him a “hunger for words” on a college campus decades ago.

“For now, let us pause and give thanks for the fact that Nelson Mandela lived — a man who took history in his hands, and bent the arc of the moral universe toward justice,” he said. “May God bless his memory and keep him in peace.”