A judge in the US state of Colorado has ruled that a bakery owner who refused service to a gay couple because of their sexuality broke the law in doing so.

The complaint was filed against Jack Phillips, after the couple David Mullins and Charlie Craig, visited the Masterpiece Cakeshop in Denver, Colorado in 2012.

The couple said Mr Phillips said he would not make a cake for them, after he found out they were celebrating their wedding in Colorado, after they got married in Massachusetts.

Now Judge Robert N Spencer has ruled that Mr Phillips broke the law in refusing the service, and ordered him to accommodate all customers in future, or face fines and possible further penalties.

In his 13-page ruling, Judge Spencer wrote: “At first blush, it may seem reasonable that a private business should be able to refuse service to anyone it chooses,

“This view, however, fails to take into account the cost to society and the hurt caused to persons who are denied service simply because of who they are.”

Earlier this week, attorneys arguing on behalf of Mr Phillips said he should not be forced to violate his religious beliefs by making the cake for the couple, while attorneys on behalf of the couple said his faith does not give him the right to discrimination.

“(His) faith, whatever it may have to say about marriage for same-sex couples or the expressive power of a wedding cake, does not give the respondents a license to discriminate,” Amanda Goad, an attorney with the American Civil Liberties Union, told an administrative judge in Colorado’s Civil Rights Commission.

Nicolle Martin, attorney for Mr Philips, said he considers himself ”privileged to design and create the cakes that celebrate the joyous events of people’s lives.

“He believes this is a vocation chosen for him by God, and as a man of God, Jack Phillips lives by certain biblical principles.”

Martin said that Phillips had not decided whether to appeal to a higher court or not.

“If the government can take away your First Amendment rights, there’s nothing they can’t take away from you,” she said.