In recent weeks, political leaders and church figures in Kenya made it clear they did not want to entertain any discussion of gay rights during President Barack Obama's visit to the African country.
Kenyan President Uhuru Kenyatta said the issue would not be on the agenda; his deputy, William Ruto, recently called homosexuality "dirty."
One conservative threatened to stage a march of 5,000 naked people in downtown Nairobi to protest Obama's support for gay and lesbian rights.
But Obama dwelled at length on gay rights at Saturday's news conference with Kenyatta, comparing discrimination against homosexuals with the US history of slavery and warning that governments should not treat good, law-abiding citizens differently simply because of their sexual preference.
"I'm not equivocal on this. If somebody is a law-abiding citizen who's going about their business or working in a job and obeying the traffic signs and doing all of the other things that good citizens are supposed to do and not harming anybody, the idea that they're going to be abused because of who they love is just wrong," Obama said.
"As an African American in the US, I am painfully aware of what happens when people are treated differently under the law."
Kenyatta responded that gay rights in Kenya is a "non-issue".
Gay rights activists, including David Kuria, praised Obama for speaking up, saying gay and lesbian activists have no chance of meeting the country's leaders and politicians to express their point of view.
"It's really great that President Obama made that point, and he did make it in a very passionate way. Tragic that our people don't seem to understand our struggles."
Kuria also expressed anger about Kenyatta's dismissive response. He and other gay and lesbian rights activists have been invited to an address to be delivered by Obama on Sunday; a gay activist will be among a small group of civil society activists due to meet the U.S. president.
Kuria said Kenyan leaders "should be embarrassed that it takes President Obama to come to Kenya to meet the leadership of the gay and lesbian community in Kenya. Tomorrow, President Obama will meet with gay and lesbian leaders, something that no one, not even the president of our country, has ever done."
Vincent Kidaha, founder of the Republican Liberty Party, a small conservative party with no lawmakers in the national parliament, said Obama had shown disrespect for Kenyans when he spoke at length about gay rights.
"Mr Barack Obama has shown the world his African family, and at the same time, he's betraying that African family. He should stop being hypocritical and be real," said Kidaha, who earlier had threatened to stage the naked march, which he said would teach Obama the difference between a man and a woman.
"We are preserving our culture. We are not acting in a savage way, but we are acting in a way to preserve the dignity of Africans," he said.
Kidaha said the organization called off the march under pressure from Kenyan authorities who said it would embarrass Kenya and Africa. His organization also is pressing for legislation to introduce life imprisonment in jail for those who voluntarily engage in gay or lesbian sex and death by stoning to foreign gays who "propagate" homosexual ideas in Kenya.
Kenyan law includes a colonial-era provision making it an offense to have "carnal knowledge ... against the order of nature" or to permit a male person "to have carnal knowledge of him or her against the order of nature." Violations are punishable by a 14-year prison sentence.
Los Angeles Times