NAIROBI (AFP) - US President Barack Obama wraps up a two-day landmark visit to Kenya on Sunday marked by aid on business and security but a firm message on gay rights and corruption.
In a joint press conference after bilateral talks with Kenyan President Uhuru Kenyatta, Obama compared homophobia - on the rise across Africa - to racial discrimination he had encountered in the United States.
After pledging stronger business ties and aid for entrepreneurs, he also called for firm action on endemic corruption, calling it "the single biggest impediment to Kenya growing even faster".
Obama arrived in Kenya late on Friday, his first visit as president to his father's birthplace and the first to the East African nation by a serving US leader.
On Sunday the president is due to give a keynote address to the country, and meet with members of Kenya's vibrant civil society - bearing the brunt of what they say are increased restrictions as Kenya fights its own 'war on terror'.
He leaves later Sunday for the Ethiopian capital Addis Ababa, where he will also be the first US leader to address the African Union.
On gay rights, he said his position has been "consistent all across Africa on this: When you start treating people differently, because they're different, that's the path whereby freedoms begin to erode. And bad things happen."
"As an African-American in the United States I am painfully aware of what happens when people are treated differently under the law. I am unequivocal on this," Obama told a joint news conference, openly disagreeing with Kenyatta.
Homophobia is on the rise in Africa, and espousing evangelical Christian values is a major vote winner in many countries. Kenyatta replied by repeating the view that gay rights were unacceptable to Kenyans and therefore "a non-issue".
A presidential visit to Kenya had been delayed while Kenyatta faced charges of crimes against humanity for his role in post-election violence seven years ago. The International Criminal Court has since dropped the case, citing a lack of evidence and accusing Kenya of bribing or intimidating witnesses.
Kenyan Vice President William Ruto, whose ICC trial continues, is also vocally homophobic and recently described gays as "dirty". Obama nevertheless shook his hand on arrival at State House.
- 'Africa rising, but get tough on corruption' -
On corruption, Obama said ordinary Kenyans were being "consistently sapped by corruption at a high level and at a low level," and called for "visible prosecutions".
"They don't have to be a forensic accountant to know what is going on," Obama said, giving the example of officials driving expensive cars or building houses far above what their salaries would allow.
The two leaders also pledged greater cooperation against Somalia's Shebab, who have also been at the top of the list of security concerns during the visit.
Nairobi has witnessed a massive security operation, with parts of the usually traffic-clogged capital locked down.
Shebab fighters have staged a string of suicide attacks and bombings on Kenyan soil, including the April massacre at Garissa university, in which 148 people died, and the 2013 assault on the Westgate shopping mall in central Nairobi that killed 67.
"We have systematically reduced the territory that Al-Shebab controls," Obama said. "That doesn't mean the problem is solved."
The president also laid a wreath at the memorial site of the former US embassy destroyed in an Al-Qaeda attack in 1998, standing in silence in memory of the 224 killed in the twin bombings in Nairobi and Tanzania.
He wrapped up the evening with a state dinner with Kenyatta, with the atmosphere lively and friendly.
Despite the areas of disagreement, the president said he was delighted to be back in Kenya.
"Obviously this is personal for me. My father came from these parts," he told an entrepreneurship summit.
Barack Obama Sr was a pipe-smoking economist who the US leader has admitted he "never truly" knew. He walked out when Obama was just two and died in a car crash in Nairobi in 1982, aged 46.
Obama still has extended family in western Kenya, who he dined with on Friday evening.
"I wanted to be here, because Africa is on the move, Africa is one of the fastest growing regions in the world," he said.
He also vowed to return, sketching plans for philanthropic work once he leaves office.
"The next time I'm back, I may not be wearing a suit," he joked.