DENVER — A baker who refused to make a wedding cake for a same-sex ceremony must serve gay couples despite his religious beliefs or face fines, a judge said Friday.

The order from administrative law judge Robert N. Spencer said Masterpiece Cakeshop in suburban Denver discriminated against a couple “because of their sexual orientation by refusing to sell them a wedding cake for their same-sex marriage.”

The order says the cake-maker must “cease and desist from discriminating” against gay couples. Although the judge did not impose fines in this case, the business will face penalties if it continues to turn away gay couples who want to buy cakes.

The American Civil Liberties Union filed a complaint against shop owner Jack Phillips with the Colorado Civil Rights Commission last year on behalf of Charlie Craig, 33, and David Mullins, 29. The couple were married in Massachusetts and wanted a wedding cake to celebrate in Colorado.

The commission is expected to certify the order next week.