JOHANNESBURG Nelson Mandela always wanted to go quietly.
Despite his stature as a global icon, he sought a dignified withdrawal from public life in recent years; privately, he told aides of his desire for a quiet funeral, stripped of pomp.
That is not how it is happening. With Mandela, 94, in critical condition in a hospital from a serious lung infection, and as President Barack Obama arrived Friday for a state visit, the country was in the grip of passions, ceremony and controversy as its people come to terms with finally bidding Mandela farewell.
Outside the hospital gates, South Africans of all races prayed, sang and dropped flowers for their revered father figure. Less harmoniously, a simmering family feud over his funeral arrangements burst into public view. A 65-year-old woman claiming to be his illegitimate daughter stepped forward, demanding to be let into the hospital to meet him.
In the evening, Obama entered the fray, faced with a delicate diplomatic balancing act involving statesmanship, policy and respect for a fading hero.
Obama, who had planned weeks ago to visit Mandela during this trip, wishes to honor the man who inspired his career in politics, mindful that he is arriving as South Africans are in mourning over their beloved former president's condition.
"I don't need a photo-op," Obama said while on his way to South Africa, where he landed just a few miles from the Pretoria hospital where Mandela has been lying in intensive care. "Right now, our main concern is with his well-being, his comfort and with the family's well-being and comfort."
At any other time, Obama's arrival would have been a symbolically potent moment with resonance for both countries: America's first black president visiting a nation that only two decades ago shook off the yoke of white minority rule.
But for South Africans, their hearts, if not their eyes, were focused on something else.
"This trip is overshadowed by Nelson Mandela's illness," said Justice Malala, a political commentator and columnist.
Some unfolding events seemed to be exactly what Mandela had hoped to avoid. A court hearing in a provincial town Friday exposed a bitter family rift over arrangements for his funeral.
Mandela has long been painfully aware of the divisions within his family, and on Friday lawyers and magistrates confirmed that 16 Mandela relatives, led by his eldest daughter, Makaziwe Mandela, had filed a lawsuit against a grandson, Mandla Mandela, a tribal chief.
A report from South Africa's national broadcaster pointed to a macabre squabble at work: The plaintiffs want to compel Mandla Mandela to rebury three relatives, who had been exhumed and moved some years ago from the family graveyard at Qunu, Nelson Mandela's home village, back in their original graves.
The court action appeared to stem from an argument over where Nelson Mandela himself should be buried. Mandla Mandela prefers a site at the headquarters of his tribal village of Mvezo, where Nelson Mandela was born; the rest of the family wants him to be buried at Qunu, where he grew up.
Among some South Africans, the government's careful management of news about Mandela even stoked speculation that it was somehow keeping him alive in order to facilitate Obama's trip. The government flatly rejected such rumors.
"Urban legend," said Mac Maharaj, the presidential spokesman. "That has been put to us before, and it is wrong. People take the government's report as accurate."
Obama, who is accompanied by his wife, Michelle, and their daughters, Sasha and Malia, arrived from Senegal and was due to travel to Tanzania on Sunday. His long-awaited African tour is intended to stress the importance of trade, not aid, for the continent.
"Everything we do is designed to make sure that Africa is not viewed as a dependent, as a charity case, but is instead viewed as a partner," Obama said Friday.
In South Africa, Obama plans to salute Mandela's life with a visit Sunday to Robben Island, the prison where Mandela spent 18 years in a tiny cell, now a somber tourist attraction inhabited mainly by penguins.
Obama's host will be President Jacob Zuma, a controversial figure who in some ways epitomizes the disappointments of the post-Mandela era.
A charismatic populist, Zuma has attracted fire for his views he is a practicing polygamist who believes all women should get married while his penchant for singing his signature song, "Bring Me My Machine Gun," causes some supporters to cringe.
Zuma's reputation has been dented by a 2006 rape trial (even though he was acquitted), corruption accusations and his handling of the police shooting of 34 striking platinum miners in August.
Today, he will meet with Obama to discuss economic development, security issues in Sudan and central Africa, and efforts to promote democracy on the continent. On Sunday, Obama is scheduled to deliver the major speech of his trip at the University of Cape Town, where Robert F. Kennedy made an address in 1966.
It is unclear whether either side will nod to the more controversial aspects of America's engagement with South Africa: accusations that the CIA helped the apartheid police arrest Mandela in 1962, or the fact that the State Department removed Mandela from its terrorist list only in 2008 15 years after he was awarded the Nobel Peace Prize.