U.S. President Barack Obama takes questions from the audience and from people in Nigeria, Uganda and Kenya via live link during a 'town hall' meeting with the young African leaders at the University of Johannesburg in Soweto June 29, 2013 in Johannesburg, South Africa. (Chip Somodevilla/Getty Images) (Chip Somodevilla/Getty Images)

President Barack Obama's comments while in Senegal last week in support of gay rights aren't sitting well with politicians in Kenya, where same-sex acts are treated as crimes.

Kenyan president Uhuru Kenyatta and deputy president William Ruto slammed Obama's remarks at separate religious events. Addressing a congregation Sunday, Ruto said Kenya will uphold its strong religious beliefs on homosexuality.

"This country, the nation of Kenya, is a God-fearing nation," Ruto said.

Homosexuality is illegal in Kenya, where 90 percent of people believe homosexuality is wrong, according to the Pew Research Center.

"Those who believe in other things, that is their business," Ruto said, referring to Obama's comments in support of gay marriage. "We believe in God."

Obama's comments followed the Supreme Court's rulings on the Defense of Marriage Act and Proposition 8. The Court's decisions legalized same sex marriage in California and granted federal benefits to married gay couples.

"When it comes to people's personal views and their religious faith, I think we have to respect the diversity of views that are there," Obama said in a joint press conference with Senegalese President Macky Sall. "But when it comes to how the state treats people, how the law treats people, I believe that everybody has to be treated equally. I don't believe in discrimination of any sort."

Sall rebuffed Obama as well, saying Senegal wasn't ready to decriminalize homosexuality. According to Pew, 96 percent of Senegal's population disapproves of homosexuality.