(CNN) An appellate court on Thursday ruled against a Colorado bakery owner who refused to make a wedding cake for a same-sex couple, rejecting among other things his denial that he discriminated against them because they are gay .

The Colorado Court of Appeals decision affirms a commission's earlier decision that Masterpiece Cakeshop in Lakewood and its owner, Jack Phillips, violated the Colorado Anti-Discrimination Act when he declined to make a cake for Charlie Craig and David Mullins' wedding reception in 2012.

Phillips, a Christian, argued that his refusal to make the cake was based on his religious opposition to the act of same-sex marriage -- a position he asserted was constitutionally protected -- not based on an opposition to their sexual orientation.

Colorado law prohibits places of public accommodation from refusing to serve people based on sexual orientation.

Phillips argued that he doesn't refuse to serve homosexuals, and told Craig and Mullins his shop would sell them any bakery product besides a wedding cake. The appeals court rejected Phillips' position.

"We conclude that the act of same-sex marriage is closely correlated to Craig's and Mullins' sexual orientation, and therefore, (an initial judge) did not err when he found that Masterpiece's refusal to create a wedding cake for Craig and Mullins was 'because of' their sexual orientation,' " the court ruled.

The appeals court also rejected Phillips' arguments that his First Amendment rights to freedom of speech and free exercise of religion were being violated.

Thursday's ruling upholds the Colorado Civil Rights Commission's 2014 ruling that Phillips must create cakes for same-sex celebrations, re-train his staff, and file quarterly reports for two years to confirm the bakery wasn't turning away customers because they were gay or lesbian.

Phillips' lawyer Jeremy Tedesco, the senior legal counsel for the Alliance Defending Freedom, said Phillips would consider further legal options.

Phillips argued that compelling him to make cakes for same-sex marriages compels him to convey a celebratory message about the ceremony, in conflict with his religious beliefs.

Photos: Same-sex couples say 'I do' Photos: Same-sex couples say 'I do' After a journey toward marriage equality, couples across the nation are now able to make their love and commitment legal and have just begun to celebrate. For many, the road that led to the Supreme Court ruling was long and hard fought, which makes the celebration even sweeter. Ray Fallon, left, and Steven Rosen, right, embrace on their wedding day at Plymouth Church, New York, where they had a small ceremony in the presence of family and friends. Their wedding was photograped by Rosen's friend Alan Barnett Hide Caption 1 of 9 Photos: Same-sex couples say 'I do' Nathania, left, and Ilana Horowitz admire Ilana's pregnant belly carrying twins. They are both social workers living in Queens, New York, and have been together for five years. They are expecting a boy and a girl. Having their marriage nationally recognized gives their family security, Nathania said. Steven Rosen photographed their wedding day. Hide Caption 2 of 9 Photos: Same-sex couples say 'I do' The timing of the Supreme Court ruling could not have been better for Drew Montalvo, left, and Eric Hanser. A year-and-a-half prior, they set their wedding date for June 27, 2015, without the slightest idea of what was to come the day before. Montalvo is an internationally recognized DJ, but he is in the process of being known by a different name. In what he describes as a progressive effort, Montalvo will be taking his husband's last name. They said "I do" on the barrier island of Fire Island Pines in New York, as captured by Lotus Wedding Photography Hide Caption 3 of 9 Photos: Same-sex couples say 'I do' For Cheryl Curtis, left, and Nina Welch, right, of Missouri, the journey to get married took them to Palm Coast, Florida, where they exchanged vows on May 10, 2015. They have been together for 11 years and enjoy going on road trips that take them to new, undiscovered places. Photo by A. Harris Photography Hide Caption 4 of 9 Photos: Same-sex couples say 'I do' Robert Ungemach, left, and Keith Emmons, right, of Dallas have been together for 19 years and said they never thought they would see same-sex marriage legal in their lifetime. They had a commitment ceremony in 2004 in Hawaii and will legally say "I do" in a Gatsby-themed wedding in August. They are having custom-made wedding rings that feature Koa wood from Hawaii and the gold from Ungemach's great grandparents' wedding rings, who emigrated from Lithuania. Photo by Steven Rosen. Hide Caption 5 of 9 Photos: Same-sex couples say 'I do' Minneapolis couple Gregory Weber, left, and James Barnett thrive on the spontaneous moments in life. After a surprise trip to New York City, Broadway shows and a walk to the Lincoln Center, Weber proposed to Barnett on May 20, 2015. That night the couple of 10 years celebrated amongst close friends, but the party had just begun. Two days later, the couple exchanged vows on the landscape of New York City's High Line, as captured by Steven Rosen Photography. Hide Caption 6 of 9 Photos: Same-sex couples say 'I do' Charlotte Soucey, left, and Lauren Watts originally eloped to Hawaii in 2013, but wanted to share their commitment with loved ones and opted for a second ceremony one year later in Ocala, Florida. They have been together for three years and Watts will soon be taking Soucey's last name. Photo by A. Harris Photography Hide Caption 7 of 9 Photos: Same-sex couples say 'I do' After 13 years together, Greg Smith, left, and Jack O'Leary, right, officially wed in Boston on their anniversary, June 6, 2015. The ceremony was officiated by O'Leary's twin brother Tom O'Leary, center, captured by Lisa's Loupe Photography . After the wedding they took the celebration to Paris where they had a second ceremony during Paris Gay Pride. Hide Caption 8 of 9 Photos: Same-sex couples say 'I do' Long Beach, New York, couple Lauren, left, and Christine Rapkin smile on their wedding day June 25, 2015, in Puerto Morelos, Mexico. They have been together for eight years and wed the day before the landmark Supreme Court decision. Christine is a critical care nurse and Lauren is an event planner and together they enjoy kayaking, beach volleyball and hiking with their dog. Photo courtesy Nicole Barr Photography. Hide Caption 9 of 9

The court disagreed.

"By selling a wedding cake to a same-sex couple, Masterpiece does not necessarily lead an observer to conclude that the bakery supports its customer's conduct," the court ruled. "The public has no way of knowing the reasons supporting Masterpiece's decision to serve or decline to serve a same-sex couple."

Ria Tabacco Mar, an ACLU attorney representing the plaintiffs in the Colorado case, told CNN last month that equal protection outweighs any free speech claim.

"What's really at issue here is cake shop's conduct of selling certain products to heterosexual customers and then refusing to sell those same products to lesbian and gay customers," she said.

"When a business opens its doors to the public, it can't discriminate on the basis of sexual orientation, on the basis of race. It can't pick and choose its customers based on who they are," ACLU Colorado Legal Director Mark Silverstein told CNN affiliate KCNC after the court's ruling.

Tedesco, Phillips' attorney, said Thursday that government has a duty to protect people's freedom to follow their beliefs "rather than force them to adopt the government's views."

"Jack simply exercised the long-cherished American freedom to decline to use his artistic talents to promote a message with which he disagrees. The court is wrong to deny Jack his fundamental freedoms," Tedesco said.

His client also spoke to KCNC.

"I think that the ruling is wrong. The Constitution guarantees me the right to practice my faith, my religion anywhere, anytime. There are no restrictions on it. It also gives me the right to free speech anytime, anywhere. I don't surrender those rights when I open my doors," Phillips said.