The Lakewood baker who, citing his religious beliefs, refused to make a wedding cake for a same-sex couple discriminated against them, the Colorado Court of Appeals ruled Thursday.

The three-judge panel issued a 64- page opinion that upholds the two previous rulings that said Masterpiece Cakeshop owner Jack Phillips cannot cite his religious beliefs or free-speech rights in refusing to make a wedding cake for a same-sex couple.

In 2012, Charlie Craig and David Mullins were turned away by Phillips while trying to buy a custom wedding cake. The two planned to marry in Massachusetts and wanted a wedding cake to celebrate in Colorado.

Phillips told the couple that he would not make them a wedding cake because of his religious beliefs.

Ria Mar, a staff attorney with the American Civil Liberties Union of Colorado, argued the case to the appeals court on behalf of Mullins and Craig.

“In America, no one should be turned away from a shop or restaurant because of who they are or who they love,” Mar said in a statement. “When every lesbian or gay person, every woman, every person of color, every person of every faith can walk into a store, a bank, a hospital, and know that they will get the same service as everyone else, we will have won. Until then, we continue to fight for the equal treatment we all deserve.”

Nicolle Martin, Phillips’ lead attorney, said her client was disappointed with the ruling but “not all that surprised.”

“I think the ruling means that some Colorado citizens have a First Amendment right to believe what they want and to act on those beliefs — such as Lé Bakery Sensual of Denver or Azucar Bakery. As long as you hold the right view on same-sex marriage, you can act on your conscience,” Martin said. “But for people like Jack Phillips, you are not entitled to those beliefs.”

Phillips plans to appeal the decision to the Colorado Supreme Court in mid-September, Martin said. Unlike the Court of Appeals, the state’s Supreme Court selects which cases it wants to hear.

Mullins said he and Craig were happy with Thursday’s ruling and hope it sends a message that “using religion to discriminate against people is against the law and it is wrong.”

“We received a huge outpouring of support from people not just from Colorado, but also around the world,” Mullins said. “The best way we can honor all the support we’ve received is to follow this through as far as it can go.”

Colorado law bans discrimination in a public place on grounds of sexual orientation. But Phillips has repeatedly argued in different courts that forcing him to make wedding cakes for same-sex couples violates his right to First Amendment rights of free speech and freedom of religion.

In his December 2013 ruling, administrative law Judge Robert N. Spencer said offering the same services to gay couples as heterosexual couples did not violate the cake shop owner’s rights to free speech or prevent him from exercising his religion.

The judge ordered the cake shop owner to “cease and desist” from discriminating against same-sex couples.

Five months later, the state’s seven-member Civil Rights Commission went further than the administrative law judge and required Phillips to submit quarterly reports for two years that show he was working to change discriminatory practices and training employees.

Phillips was also required to disclose the names of any clients who were turned away.

Phillips and his attorneys then took the case to the Colorado Court of Appeals.

Thursday’s opinion affirmed Spencer’s ruling and the Civil Rights Commission’s order.

The appeals court wrote that the Colorado Anti-Discrimination Act “does not compel Masterpiece to support or endorse any particular religious views. The law merely prohibits Masterpiece from discriminating against potential customers on account of their sexual orientation.”

Making a cake for a same-sex couple does not force the cake shop to convey a message supporting marriages between same-sex couples. But the law does prohibit the bakery from “picking and choosing its customers based on their sexual orientation.”

In other recent cases:

A bakery near Portland, Ore., that two years ago declined to make a wedding cake for a gay couple was ordered in July to pay $135,000 in damages.

Two years ago, the New Mexico Supreme Court ruled that a photographer who wouldn’t take pictures of a gay couple’s 2006 commitment ceremony violated the state’s anti-discrimination law.

In Washington state, a florist has been fighting a lawsuit filed after she refused to provide services for a gay wedding in 2013.

The Associated Press contributed to this report.

Jordan Steffen: 303-954-1794, jsteffen@denverpost.com or twitter.com/jsteffendp