A portrait of former South African President Nelson Mandela is displayed in a street outside Union Buildings in Pretoria. A gravely ill Mandela showed tentative signs of improvement Thursday as South Africa-bound US President Barack Obama led a chorus of support for the "hero for the world." (AFP/Getty)

To understand President Obama’s reverence for South Africa’s former president, it’s important to remember the role anti-apartheid activism played on college campuses in the 1980s.

In a Thursday press conference in Senegal, Obama recalled, “My first act of political activism was when I was at Occidental College. As a 19-year-old, I got involved in the anti-apartheid movement back in 1979, 1980, because I was inspired by what was taking place in South Africa.”

The president’s former college classmate, Margo Mifflin, wrote an interesting first-hand account of those protests last fall in The New Yorker, describing how Obama made his first public speech on Feb. 18, 1981. As the rally’s opening speaker, Obama started to talk about global companies propping up a repressive regime but was quickly carried off by two other students acting as Afrikaners who were stifling his free speech rights.

Throughout the 1980s the anti-apartheid movement galvanized college students across the U.S., as they successfully pressured U.S. companies and universities to divest of their South Africa holdings. For many students, this represented their entry point into political activism.

(Live updates on Obama's journey through Africa)

At the press conference Thursday, Obama explained why Mandela inspired him.

“I think at that time I didn’t necessarily imagine that Nelson Mandela might be released, but I had read his writings and his speeches, and I understood that this was somebody who believed in that basic principle I just talked about -- treating people equally -- and was willing to sacrifice his life for that belief,” he said.

Mandela’s approach to his former enemies upon his release, the president added, expanded his understanding of political reconciliation.

“When I was in law school, in 1990, 1991, to see Nelson Mandela step forward after 27 years of captivity and not only help usher in democracy and majority rule, and one person, one vote in South Africa, but as importantly, for him to say, I embrace my former captors and my former oppressors, and believe in one nation and believe in judging people on the basis of their character and not their color -- it gave me a sense of what is possible in the world when righteous people, when people of goodwill work together on behalf of a larger cause,” he said.

Noting that he “had the privilege of meeting Mandela and speaking to him” in 2005 while serving as a senator, Obama did not say whether he would meet with the 94-year leader, who is seriously ill, while visiting South Africa over the next couple of days. But he made it clear that Mandela continues to loom large in his own political psyche, as well as in those of many others.

“And he’s a personal hero, but I don’t think I’m unique in that regard,” the president said. “I think he’s a hero for the world. And if and when he passes from this place, one thing I think we’ll all know is that his legacy is one that will linger on throughout the ages.”