Obama lectures Kenyan president on gay rights

Updated 1:39 PM EDT, Sat July 25, 2015
U.S. President Barack Obama and Kenyan President Uhuru Kenyatta inspect an honor guard on July 25, 2015 at the State House in Nairobi.
SIMON MAINA/AFP/Getty Images
U.S. President Barack Obama and Kenyan President Uhuru Kenyatta inspect an honor guard on July 25, 2015 at the State House in Nairobi.
Now playing
01:43
Obama, Kenyatta, make stances on gay rights clear
KTVK
Now playing
01:03
Anti-gay pastor banned from entering South Africa
FILIPPO MONTEFORTE/AFP/Getty Images
Now playing
01:19
Pope Francis: Apologize to gay people and others
AFP/Getty Images
Now playing
02:30
Thousands of gay men pardoned
gay marriage australia pkg lu stout_00021804.jpg
gay marriage australia pkg lu stout_00021804.jpg
Now playing
02:58
Australia's Labor Party against marriage referendum
Now playing
04:27
Afghan gay rights activist: 'Minority within a minority'
gay nightclub attacks dnt kaye ac_00005605.jpg
gay nightclub attacks dnt kaye ac_00005605.jpg
Now playing
03:00
A history of attacks on gay nightclubs
miss Missouri gay America pageant intv banfield lv_00000607.jpg
miss Missouri gay America pageant intv banfield lv_00000607.jpg
Now playing
01:44
First openly gay Miss America contestant speaks out
lbgt group st patricks day parade new york sot_00001606.jpg
WABC
lbgt group st patricks day parade new york sot_00001606.jpg
Now playing
00:53
NYC Mayor: This parade says the city is whole, unified
Judge recinds order lesbian foster parents adoption lv_00000000.jpg
Family Photo
Judge recinds order lesbian foster parents adoption lv_00000000.jpg
Now playing
00:48
Judge rescinds order in same-sex adoption
same sex kissing arrest sidner pkg_00000128.jpg
same sex kissing arrest sidner pkg_00000128.jpg
Now playing
03:16
Same-sex couple: We were arrested for kissing
Republican presidential candidate and Texas senator Ted Cruz speaks during the Iowa Faith and Freedom Coalition annual banquet and presidential forum  Monday June 22, 2015 in Des Moines, Iowa.
(Taylor Glascock for CNN)
Taylor Glascock for CNN
Republican presidential candidate and Texas senator Ted Cruz speaks during the Iowa Faith and Freedom Coalition annual banquet and presidential forum Monday June 22, 2015 in Des Moines, Iowa. (Taylor Glascock for CNN)
Now playing
01:18
Ted Cruz discusses religious liberty
Pope Francis meets hugs same sex couple_00000803.jpg
Marisa Marchitelli
Pope Francis meets hugs same sex couple_00000803.jpg
Now playing
00:48
Pope Francis meets with, hugs same-sex couple
Mike Huckabee Supreme Court debate newday_00000000.jpg
Mike Huckabee Supreme Court debate newday_00000000.jpg
Now playing
02:50
Huckabee doubles down on Supreme Court comments
CNN
Now playing
02:02
Lawyer: Kim Davis met with Pope Francis
Kim Davis released jail_00001502.jpg
Kim Davis released jail_00001502.jpg
Now playing
01:12
Kim Davis and the fight over same-sex marriage

Story highlights

Obama equated legalized discrimination of gays to legalized racism in America

Under Kenyan law, sexual activity between men is illegal and punishable with a maximum imprisonment of 14 years

(CNN) —  

President Barack Obama on Saturday lectured Kenyan President Uhuru Kenyatta about his country’s gay rights record.

“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,” Obama said at a joint press conference with the Kenyan leader in Nairobi. “And bad things happen.”

Under Kenyan law, sexual activity between men is illegal and punishable with a maximum imprisonment of 14 years. Many Kenyan leaders had encouraged Obama not to discuss gay rights on his first trip to the country as President.

But Obama equated legalized discrimination of gays to legalized racism in America.

“And when a government gets in a habit of people treating people differently, those habits can spread,” Obama continued. “As an African-American, I am painfully aware of what happens when people are treated differently under the law.”

Kenyatta, however, said that while the U.S. and Kenya share many common values and goals, gay rights is not one of them.

RELATED: For Obama, historic return to Kenya comes after long wait

“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,” Kenyatta said. “But there are some things that we must admit we don’t share. Our culture, our societies don’t accept.”

“It is very difficult for us to be able to impose on people that which they themselves do not accept,” Kenyatta continued. “This is why I repeatedly say for Kenyans today the (gay rights issue) is generally a non-issue. We want to focus on other areas.”

After that comment, a small amount of applause was heard, presumably from some of the audience attending.