DAKAR, June 28 (Reuters) - U.S. President Barack Obama heads to South Africa on Friday hoping to see ailing icon Nelson Mandela, after wrapping up a visit to Senegal that focused on improving food security and promoting democratic institutions.
Obama is in the middle of a three-country tour of Africa that the White House hopes will compensate for what some view as years of neglect by the administration of America's first black president.
Before departing Dakar, Obama was scheduled to meet with farmers and local entrepreneurs to discuss new technologies that are helping farmers and their families in West Africa, one of the world's poorest and most drought-prone regions.
But it was Mandela, the 94-year-old former South African president who is clinging to life in a Pretoria hospital, who will dominate the president's day even before he arrives in Johannesburg.
Asked on Thursday whether Obama would be able to pay Mandela a visit, the White House said that was up to the family.
"We are going to completely defer to the wishes of the Mandela family and work with the South African government as relates to our visit," deputy national security adviser Ben Rhodes told reporters in Senegal.
"Whatever the Mandela family deems appropriate, that's what we're focused on doing in terms of our interaction with them."
Obama sees Mandela, also known as Madiba, as a hero. Whether they are able to meet or not, officials said his trip would serve largely as a tribute to the anti-apartheid leader.
"I've had the privilege of meeting Madiba and speaking to him. And he's a personal hero, but I don't think I'm unique in that regard," Obama said on Thursday. "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."
The president arrives in South Africa Friday evening and has no public events scheduled. He could go to the hospital then.
Obama is scheduled to visit Robben Island, where Mandela spent years in prison, later during his trip.
On Friday morning, Obama will take part in a "Feed the Future" event on food security. That issue, along with anti-corruption measures and trade opportunities for U.S. companies, are topics the White House wants to highlight on Obama's tour.
Obama, who has been in office since 2009, has only visited Africa once in his presidential tenure: a short trip to Ghana at the beginning of his first term.
While acknowledging that Obama has not spent as much time in Africa as people hoped, the administration is eager to highlight what it has done, in part to end unflattering comparisons to accomplishments of predecessors George W. Bush and Bill Clinton.
Food security and public aid are two of the issues the Obama team believes are success stories.
"Africa has seen a steady and consistent increase in our overall resource investment each year that we've been in office," said Raj Shah, head of USAID. "And sustaining that in this political climate has required real trade-offs to be made in other areas, but we've done that." (Editing by Daniel Flynn and Stacey Joyce)