President Barack Obama does not yet know whether he'll be able to visit Nelson Mandela when he arrives in South Africa.

"We'll see what the situation is when we land," Obama told reporters aboard Air Force One en route from Dakar, Senegal, to Johannesburg. "I don't need a photo op and the last thing I want to do is to be in any way obtrusive at a time when the family is concerned with Nelson Mandela's condition."

Mandela was admitted to a hospital in Pretoria three weeks ago for treatment of his recurring lung infection. Doctors have managed to stabilize him at times, yet describe his general condition as critical and on the decline.

Obama said, "I think the main message we'll want to deliver, if not directly to him, but to his family, is simply profound gratitude for his leadership."

While in Dakar, Obama told reporters that Mandela was his personal hero and that his first act of political activism at age 19 was anti-apartheid organizing when he was a student at Occidental College.

Obama said Mandela's embrace of his former captors after his release from prison in 1990 "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."

The two leaders met in the United States in 2005, but as far as meeting in South Africa, the White House said the president will follow the family's lead on what's possible.