In a news conference in Senegal during his three-nation tour, just as the U.S. Supreme Court struck down a federal ban on same-sex marriage, Obama said African nations must grant equal protection to all people regardless of their sexual orientation.

“My basic view is that regardless of race, regardless of religion, regardless of gender, regardless of sexual orientation, when it comes to how the law treats you, how the state treats you … people should be treated equally,” Obama said. “And that’s a principle that I think applies universally.”

But Obama’s words rubbed religious and political leaders the wrong way. In Senegal, the West African nation where Islam is the predominant religion, homosexuality is a crime.

Christianity and Islam are growing fast on the continent, and religious leaders in both faith communities responded with vehement denunciations.