President Obama and Kenyan President Uhuru Kenyatta clashed at a joint press conference in the African state during his official visit on Sunday: Obama harshly criticized Kenya’s record on issues related to homosexuality.

“When you start treating people differently not because of any harm they are doing to anybody, but because they are different, that’s the path whereby freedoms begin to erode,” he said. “Bad things start to happen.”

The President also compared Kenya’s laws to Jim Crow-era segregationist policies.

He pontificated:

As an African-American in the United States, I am painfully aware of the history of what happens when people are treated differently, under the law, and there were all sorts of rationalizations that were provided by the power structure for decades in the United States for segregation and Jim Crow and slavery, and they were wrong.

In Kenya, gay marriage is outlawed. Homosexuality is also against the law, punishable by up to 14 years in prison, and the global move towards recognition of homosexual unions is regarded with suspicion.

President Kenyatta was visibly uncomfortable throughout Obama’s comments.

However, after being pressed by a reporter, he remarked that President Obama’s comments highlight a difference between the United States and Africa.

“The fact of the matter is Kenya and the U.S. share so many values: common love for democracy, entrepreneurship, value for families–these are some things that we share,” he said. “But there are some things that we must admit we don’t share. Our culture, our societies don’t accept.”

He went on to argue that calling for tolerance of LGBT Africans is to impose one’s will on a foreign culture, and that, to most Kenyans, the recent liberalization of marriage laws across the globe is a non-issue.

He also said that Kenya has many more problems to focus on, and that the West should be helping them on issues related to equality for women, water sanitation, and economic growth before attacking laws many Kenyans view as an important safeguard of their culture.

President Kenyatta is not the only important Kenyan leader taking a stand for his country’s opposition to homosexuality. Much of the Kenyan clergy has been quick to strike back at President Obama’s assertions.

Cardinal John Onaiyekan, the Catholic Archbishop of the Abuja Diocese in Kenya, said on Sunday:

Even if people don’t like us for it, our church has always said homosexuality is unnatural and marriage is between a man and a woman. There is no such thing as marriage between two men or marriage between two women, whatever they do among themselves should not be called marriage.

“There is no question of the Catholic Church changing its positions on this matter,” he boldly stated.

Before coming to Kenya, President Obama was warned by top Kenyan political figures not to mention homosexuality, gay rights, or other aspects of his socially liberal agenda on his visit.

“We are telling Mr. Obama when he comes to Kenya this month and he tries to bring the abortion agenda, the gay agenda, we shall tell him to shut up and go home,” Irungu Kangata, a national leader, told demonstrators outside Kenya’s Parliament earlier this month.

“Liberal thoughts are being tolerated in some countries under the guise of human rights,” Kenyan National Assembly Speaker Justin Muturi said. “We must be vigilant and guard against [gay marriage and abortion].”

“We must lead an upright society and not allow obnoxious behavior, as we have a responsibility to our children,” Muturi also said.