President Barack Obama, in the midst of an historic tour of Africa, says he isn't certain about whether he'll be able to visit gravely ill Nelson Mandela when he arrives in South Africa.

Posters of Nelson Mandela are displayed at the Cape Town City Hall as a tribute to the hospitalized former statesman (Michelly Rall/Getty Images)

Speaking to reporters aboard Air Force One en route from Dakar, Senegal to Johannesburg, Obama said, "We'll see what the situation is when we land."

Obama adds, quote, "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."

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." Mandela is a former president of South Africa.

South Africa: Family visits critically ill Mandela

Members of Nelson Mandela's family as well as South African Cabinet ministers have visited the hospital where the 94-year-old former president is critically ill.

One of Mandela's daughters, Makaziwe Mandela, was among family members who arrived at the Pretoria hospital on Friday. The ministers of health and defense also visited, the South African Press Association reported.

The anti-apartheid leader was taken to the hospital on June 8 to be treated for what the government said was a recurring lung infection. South Africans have held prayers nationwide, and many have left flowers and messages of support outside the hospital as well as his home in Johannesburg.

On Thursday, the office of South African President Jacob Zuma said Mandela's health had improved overnight, and that his condition was critical but stable.

(Copyright 2013 The Associated Press. All Rights Reserved)