President Obama met with the family of ailing former South African President Nelson Mandela on Saturday.

Obama spoke with the family at the Mandela Centre of Memory, but he will not meet the 94-year old Mandela, who is battling for his life in the hospital after contracting a serious lung infection.

“Today I had the privilege of meeting with members of the Mandela family at the Nelson Mandela Foundation in Johannesburg, South Africa, and spoke by telephone with Mrs. Graça Machel, who remained by her husband's side in the hospital in Pretoria,” said Obama in a statement. 

“I expressed my hope that Madiba draws peace and comfort from the time that he is spending with loved ones, and also expressed my heartfelt support for the entire family as they work through this difficult time,” he continued. “I also reaffirmed the profound impact that his legacy has had in building a free South Africa, and in inspiring people around the world - including me. That's a legacy that we must all honor in our own lives, including this July on Mandela Day.”

“Madiba and his family remain in our thoughts and prayers,” Obama added.

Mandela, who is known as Madiba in South Africa, led the nation’s battle against apartheid, endured a long prison sentence and eventually became the country’s first black president.

Obama is in South Africa as part of a weeklong visit to Africa. He held a bilateral meeting and press conference Saturday with South African President Jacob Zuma.

During the press conference Saturday, Obama hailed Mandela as “one of the greatest people in history.”

“Nelson Mandela showed what’s possible and the people of South Africa showed what’s possible when priorities are placed on constitutions and the rule of law and human dignity and all people are treated equally,” said Obama.

He praised Mandela for showing that “the well-being of a country is more important than the interest of any one person.”

Obama had initially hoped to meet Mandela during the Africa trip, but those plans were sidelined after his hospitalization. 

"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 told reporters Saturday.

"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."

This story was posted at 5:28 a.m. and has been updated.

Meghashyam Mali contributed