In this June 6, 2013, photo, Dave Mullins, right, sits with his husband, Charlie Craig, in Denver. (Brennan Linsley/AP)

A baker violated Colorado’s public accommodations law when he refused to make a wedding cake for a same-sex couple, the state appeals court wrote in its opinion Thursday.

Masterpiece Cakeshop owner Jack Phillips decorates a cake inside his store, in Lakewood, Colo. (AP Photo/Brennan Linsley, File) Masterpiece Cakeshop owner Jack Phillips decorates a cake inside his store, in Lakewood, Colo. (AP Photo/Brennan Linsley, File)

The Colorado Court of Appeals ruling upheld previous decisions in favor of Charlie Craig and David Mullins, who in 2012 visited Masterpiece Cakeshop in Lakewood, Colo., but were refused by owner Jack Phillips.

Phillips cited his Christian beliefs as justification for the decision, and contended that creating the cake would violate his right to free speech, as well as his religious freedom.

[More on this case: Trial begins in Colorado same-sex marriage cake case]

“CADA prohibits places of public accommodations from basing their refusal to serve customers on their sexual orientation, and Masterpiece violated Colorado’s public accommodations law by refusing to create a wedding cake for Craig’s and Mullins’ same-sex wedding celebration,” the ruling states.

(CADA stands for Colorado Anti-Discrimination Act, which prohibits discrimination on the basis of sexual orientation.)

The ruling states that Masterpiece “remains free to continue espousing its religious beliefs,” but it is prohibited from “picking and choosing customers based on their sexual orientation” if it wants to remain open to the public.

[Opinion: The Volokh Conspiracy on the Colorado appellate court ruling]

“Today is a proud day for equality and for upholding the law. In America, no one should be turned away from a shop or restaurant because of who they are or who they love,” Ria Mar, staff attorney for the American Civil Liberties Union’s LGBT Project, which argued the case, said in a statement.

The Associated Press noted that attorneys who represent Phillips have said they “would consider appealing up to the nation’s high court,” in reference to the U.S. Supreme Court, which in June struck down state laws against same-sex marriage.

[Related: Federal judge orders Christian clerk to issue same-sex marriage licenses]

“Jack simply exercised the long-cherished American freedom to decline to use his artistic talents to promote a message with which he disagrees,” Jeremy Tedesco, an attorney with the Arizona-based Alliance Defending Freedom, said in a statement. “The court is wrong to deny Jack his fundamental freedoms. We will discuss further legal options.”

[Related: Colorado bakery that refused to bake anti-gay cakes did not discriminate, state agency says]

In 2012, Phillips had told Craig’s mother that he wouldn’t make the cake because of his religious beliefs, and because the state didn’t recognize gay marriage, the court documents state. The ruling also notes that Phillips “believes that decorating cakes is a form of art, that he can honor God through his artistic talents, and that he would displease God by creating cakes for same-sex marriages.”

“We conclude that the act of designing and selling a wedding cake to all customers free of discrimination does not convey a celebratory message about same-sex weddings likely to be understood by those who view it,” the ruling states. “We further conclude that, to the extent that the public infers from a Masterpiece wedding cake a message celebrating same-sex marriage, that message is more likely to be attributed to the customer than to Masterpiece.”

The decision is the latest in a string of similar cases across the United States. For example, the owners of an Oregon bakery was ordered to pay $135,000 in damages after declining to bake a cake for a same-sex wedding, and a florist in Washington state was sued after she wouldn’t provide flower arrangements for the nuptials of a gay couple.

Read More:
Why gay honeymooners should stop avoiding countries with anti-LGBT laws

The gay-wedding industry goes mainstream

A vexing question for GOP hopefuls: ‘Would you go to a gay wedding?’