NAIROBI, Kenya — President Obama reached deep into his personal history on Sunday to urge this East African nation to reject the "dark corners" of its past and chart a "path to progress" befitting the 21st century.
Throughout his much-anticipated, three-day trip here, Obama delighted his father's native country with humorous references to his family connections and by speaking short phrases in Swahili.
At the same time, Obama gently reminded Kenyans that his relationship with their nation today must be that of a U.S. president, not native son.
But as he departed for Ethiopia, Obama stepped fully into his unique role and spoke frankly to Kenyans as only a member of the family can, describing himself proudly as a "Kenyan American."
Reflecting on his family's past and their country's future, Obama declared Kenya to be "at a crossroads" where it can either move forward or bind itself to harmful African traditions.
Tribalism, corruption, oppression of women and genital mutilation of girls all serve, the president said, as an "anchor that holds you down."
"Every country has traditions that are unique," he told an enthusiastic crowd of university students and other young people. "Just because something is a part of your past doesn't make it right. It doesn't mean that it defines your future."
Obama recalled the experiences of his father and grandfather, and his own journey in coming to terms with their struggles.
"In many ways, their lives offered snapshots of Kenya's history, but they also told us something about the future," he said.
Obama's grandfather served as a cook for the British army under colonial rule and was forced to carry a humiliating domestic-servant passbook that referred to the grown man as a "boy" and included the number of his teeth.
Barack Obama Sr. was a self-motivated, promising government economist whose career was cut short due largely to tribal discrimination and government corruption, but also his personal struggles with alcohol. He met and married Obama's mother when he was an exchange student in Hawaii, but left them to return to Kenya when Obama was still a small child. Obama Sr. died in a 1982 car accident, barely knowing his American son.
"Ultimately, he found disappointment — in part because he couldn't reconcile the ideas that he had for his young country with the hard realities that had confronted him," said Obama, who wrote extensively about his father in his 1995 autobiography, "Dreams From My Father."
"And I think sometimes about what these stories tell us, what the history and the past tell us about the future. They show the enormous barriers to progress that so many Kenyans faced just one or two generations ago."
Just as Obama has written and spoken about facing his father's promise and failings, he called upon Kenyans to acknowledge their past and move forward.
"Progress requires that you honestly confront the dark corners of our own past," he said. "You can choose the path to progress, but it requires making some important choices."
Obama met and grew closer to his Kenyan family in three trips to the country after his father's death, but after his election as president he said he avoided visiting his father's homeland, in part so that he wouldn't seem to be playing favorites.
His Kenyan roots have at times been a political liability as opponents falsely claimed that Obama was secretly born in Kenya, rather than Hawaii, making him ineligible to be president.
Aides said Sunday marked the first time since taking office that Obama has publicly referred to himself as "Kenyan American."
The trip to Nairobi was a festive homecoming of sorts for Obama. His half-sister, Auma Obama, organized a dinner with several dozen distant relatives who drove in from faraway villages. At a news conference Saturday, Obama joked about the "need to manage family politics sometimes," and noted that upon meeting some relatives for the first time, "there were lengthy explanations, in some cases, of the connections."
He was also greeted at the airport by a line of dignitaries, led by President Uhuru Kenyatta, son of Jomo Kenyatta, the nation's founding father, whose government once blacklisted Obama's father.
The relationship between their sons has also been fraught with tension. Obama and Kenyatta agreed to work together to fight the Somali terrorist group Shabab and to build economic and trade ties between their nations.
But they disagreed on the subject of gay rights, which many of Kenyatta's constituents strongly oppose.
And Obama condemned corruption in the Kenyan government. "I want to be very clear here: A politics that's based solely on tribe and ethnicity is a politics that's doomed to tear a country apart," Obama said.
But Obama avoided bringing up complaints that the Kenyatta government has obstructed the International Criminal Court's investigations into charges that some current Kenyan government officials played a role in the postelection ethnic clashes of 2008. A case against Kenyatta was dropped last year for lack of evidence.
Kenyatta defended Obama against complaints that the first African American president has not done enough for Africa.
"I tend to disagree with that statement, because 'enough' is not about how much money you put on the table," Kenyatta said. "We are brothers and sisters, fellow travelers in the struggle for a better world for all."
Kenyatta did not address the relationship of their fathers. But in his toast at a state dinner on Saturday night, Obama surprised his closest staffers by wandering onto the topic.
"Our fathers were people who lived at the same time, and went through independence of this country at the same time, and took different paths," he said. "And it's true that it would have been hard for them to imagine how their sons might be sitting here today."
He added, "But there's an expression that says we plant a tree not because we will enjoy its shade, but because our children and grandchildren will."
After Sunday's speech, Obama met with young African leaders for a town hall meeting about how to build the kind of society he envisions. Late in the afternoon, he boarded Air Force One for Ethiopia, the second of two countries on this summer trip to the African continent.
He made a promise to return, saying next time he might not be wearing a suit or arrive with the formal trappings of a sitting president. Obama is expected to make Africa a key part of his post-presidency work.
President Obama "gets us," said his half-sister, Auma, introducing him on Sunday. "He is something warm in your heart, that is close to you."
She recalled a saying among the Obama family's Luo tribe that when someone is out of touch, he or she is said to be "lost."
"My brother," she said, "is not lost."
MORE ON OBAMA IN KENYA: