WASHINGTON (CNS) — The U.S. Supreme Court said June 26 it will hear arguments next term on whether a Denver baker unlawfully discriminated against a same-sex couple in declining to make them a wedding cake.

The justices agreed to hear an appeal from Jack Phillips, owner of Masterpiece Cakeshop, after lower courts ruled he had violated Colorado’s anti-discrimination law. Phillips has contended that the law violated his rights to freedom of speech and the free exercise of religion.

Similar cases in courts across the country have involved florists and other service-oriented business owners who say their religious beliefs prohibit them from providing services to same-sex couples. The owners have met with little success in the courts, which have determined that public businesses must comply with anti-discrimination laws.

The Supreme Court had considered whether to hear the Phillips case for weeks. Justices declined in 2014 to review a New Mexico Supreme Court case that found that a photographer violated a state civil rights law when she declined to photograph a lesbian couple’s commitment ceremony.

Since then, the court has ruled that marriage is a fundamental right and marriage licenses cannot be denied to same-sex couples nationwide.

In the cake case, Charlie Craig and David Mullins approached Masterpiece Cakeshop to order a cake for their wedding reception. They had planned to marry in Massachusetts, where same-sex marriage was legal at the time, and hold a reception in Colorado.

Phillips refused to discuss the request, telling Craig and Mullins that his religious beliefs would not allow him to provide the cake. He said other bakeries could accommodate the request though.

The couple filed a complaint with the Colorado Civil Rights Commission, which decided that the baker’s action violated state law. The Colorado Court of appeals upheld the commission’s decision. The shop owner petitioned the Colorado Supreme Court to review the case, but the court declined.

In July 2016, the bakery asked the U.S. Supreme Court to review the case, which is called Masterpiece Cakeshop v. Colorado Civil Rights Commission.

In another case, the justices reversed an Arkansas Supreme Court ruling, saying the state must list same-sex parents on birth certificates. The argument centered on whether a state violates the 14th Amendment by denying married same-sex couples the same right afforded to married opposite-sex couples under state law to have the name of the birth mother’s spouse entered as the second parent on their child’s birth certificate.

Justices Samuel A. Alito Jr., Clarence Thomas and Neil M. Gorsuch, the newest member of the court, dissented, saying the law regarding such issues is not yet settled.