The U.S. Supreme Court is set to hear arguments on a question that divided the American people in a 2016 Pew Research Center survey: whether businesses that provide wedding services should be required to cater to same-sex couples or whether they should be able to refuse based on religious objections to homosexuality.

The case the justices will take up involves a Colorado bakery owner who argues that he should not be forced to make cakes for same-sex weddings because such unions conflict with his religious beliefs. A same-sex couple attempted to order a cake from the owner’s shop, and, after the owner declined, the Colorado Civil Rights Commission ruled he was in violation of a state law that prohibits discrimination on the basis of sexual orientation.

The question at the center of the case echoes one the Center posed to Americans last year. In that survey, U.S. adults were evenly divided, with roughly half (49%) saying businesses should be required to provide wedding services to same-sex couples, and a nearly identical share (48%) saying that they should be able to refuse to provide services due to religious objections.

There were sharp differences based on respondents’ religious affiliation and political party. A large majority of white evangelical Protestants (77%) said businesses should be allowed to refuse service to same-sex couples, while most religiously unaffiliated Americans (65%) and Jews (64%) took the opposite position. In addition, most Republicans and those who lean toward the Republican Party (71%) said refusal of service based on religious objections is acceptable, while two-thirds of Democrats (67%) disagreed, saying instead that wedding-related businesses should be required to serve same-sex couples just as they would any other couple.

Not only was the overall public evenly split on this question, but relatively few Americans said they could sympathize with both sides of the debate. Roughly a third of U.S. adults (36%) said they sympathize only with the view that businesses should be required to serve same-sex couples, while about three-in-ten (31%) sympathized only with the view that businesses should be able to refuse service due to religious objections. Just 18% said they sympathize at least some with both sides, while an additional 15% sympathized with neither perspective.

The Colorado case has reached the high court amid a backdrop of rising societal acceptance of homosexuality and same-sex marriage. Seven-in-ten Americans now say homosexuality should be accepted by society, up from 51% who held this view in 2006. Even among Republicans and those who lean toward the GOP, a slim majority (54%) now say society should accept homosexuality.

Similarly, support for same-sex marriage has been rising for more than a decade, with 62% of U.S. adults now in favor of allowing gay and lesbian couples to marry legally. Again, there are stark differences by both religion and political party, but support for same-sex marriage has been rising across the board, including among white evangelical Protestants and Republicans.