American Civil Liberties Union activists demonstrate in front of the Supreme Court on June 4 in Washington. The Supreme Court ruled for a Colorado baker who wouldn't make a wedding cake for a same-sex couple in a limited decision that leaves for another day the larger issue of whether a business can invoke religious objections to refuse service to gays. (J. Scott Applewhite/AP)

The Supreme Court ruled Monday in favor of a Colorado baker who refused to create a wedding cake for a gay couple in a 7 to 2 decision. That decision is in contrast to popular opinion: Most Americans don't support allowing gay Americans to be denied services because of the religious convictions of a business owner.

Justice Anthony M. Kennedy wrote that the Colorado Civil Rights Commission had not adequately taken into account the religious beliefs of Jack Phillips, a baker and cake artist who refused to make a wedding cake for the upcoming nuptials of two gay men.

“The Court’s precedents make clear that the baker, in his capacity as the owner of a business serving the public, might have his right to the free exercise of religion limited by generally applicable laws,” Kennedy wrote. “Still, the delicate question of when the free exercise of his religion must yield to an otherwise valid exercise of state power” needed to be done in a setting where “religious hostility on the part of the State itself would not be a factor.”

In a December op-ed, Phillips wrote:

“What a cake celebrating this event would communicate was a message that contradicts my deepest religious convictions, and as an artist, that’s just not something I’m able to do, so I politely declined.

But this wasn’t just a business decision. More than anything else, it was a reflection of my commitment to my faith. My religious convictions on this are grounded in the biblical teaching that God designed marriage as the union of one man and one woman.”

But allowing business owners to refuse service to gay people because of the religion of the business owner remains pretty unpopular with the American people. Six in 10 Americans oppose allowing a small-business owner in their state to refuse products or services to gay people even if providing them would violate the business owner's religious beliefs, according to survey findings published in May by the Public Religion Research Institute.

And this high number isn't just because of the growing number of Americans who no longer claim a particular faith. Opposition to same-sex marriage did not correlate with support for refusing service to gay Americans as strongly as some might think. Even among the 30 percent of Americans who oppose same-sex marriage, nearly half — 45 percent — opposed allowing small-business owners to refuse service to gay people.

In fact, members of most religious groups do not support small-business owners being able to refuse service to gay people for religious reasons.

There are only two major religious groups in which the majority of adherents think that small-business owners should be able to refuse service to gay people for religious reasons: white evangelical Protestants and Mormons.

Interestingly, the group that is more likely than any other racial or ethnic group to oppose religiously based service refusals is also the group that has one of the highest rates of religious affiliation. Nearly two-thirds of black Americans oppose allowing businesses to refuse service based on faith. And the vast majority — 75 percent — of black Americans are Christian, according to PRRI.

But that's not particularly surprising. The history of black people in the United States is one that includes being denied services because of identity. And throughout history, poor treatment of black Americans, including denying them services, was often based on religious beliefs.

Kelly J. Baker, author of “The Gospel According to the Klan,” previously told The Washington Post: “[Klan leaders] would look to Christianity to find support for racism. Even liberal Protestant churches supported white supremacy. That seemed the natural order of things. Just as people used biblical texts to support slavery.”

Kennedy's opinion speaks to the need to ensure that all Americans — gay people, religiously observant and religiously observant gay people — are not treated differently.

“The outcome of cases like this in other circumstances must await further elaboration in the courts all in the context of recognizing that these disputes must be resolved with tolerance, without undue disrespect to sincere religious beliefs, and without subjecting gay people to indignities when they seek goods and services in an open market,” he wrote.