The Trump administration delivered a new blow to the gay and lesbian community on Thursday when the U.S. Department of Justice sided against a same-sex couple in a major discrimination case at the U.S. Supreme Court.

In the case, Masterpiece Cakeshop v. Colorado Civil Rights Commission, baker Jack Phillips challenges rulings that he violated state anti-discrimination laws when he refused to bake a wedding cake for a same-sex couple because, he claimed, it was against his religious beliefs. His lawyers argue the First Amendment speech and free exercise clauses bar the Colorado commission from compelling Phillips, a self-described “artist,” from creating a “custom expression” that he deems objectionable.

In the Justice Department's amicus brief supporting the cake shop, Acting U.S. Solicitor General Jeffrey Wall argued the First Amendment bars application of Colorado's public accommodations law to the baker because it unconstitutionally compels speech.

“Weddings are sacred rites in the religious realm and profoundly symbolic ceremonies in the secular one,” Wall and a team of DOJ lawyers wrote in the brief. “When Phillips designs and creates a custom wedding cake for a specific couple and a specific wedding, he plays an active role in enabling that ritual, and he associates himself with the celebratory message conveyed.”

The DOJ's brief continued: “Forcing Phillips to create expression for and participate in a ceremony that violates his religious beliefs invades his First Amendment rights.” The government said Colorado “has not offered, and could not reasonably offer, a sufficient justification for that compulsion here.”

A Justice Department representative, Lauren Ehrsam, said in a statement Thursday: “The department filed an amicus brief in this case today because the First Amendment protects the right of free expression for all Americans. Although public accommodations laws serve important purposes, they—like other laws—must yield to the individual freedoms that the First Amendment guarantees. That includes the freedom not to create expression for ceremonies that violate one's religious beliefs.”

The Justice department brief supporting Phillips is one of a number of recent Trump administration actions that dismayed the LGBTQ community. The White House recently said it would move to ban transgender people from serving in the military, and the Justice Department lined up against wider gay and lesbian workplace rights in a key discrimination case in the U.S. Court of Appeals for the Second Circuit. In February, the administration announced it was rescinding guidance protecting transgender students' use of public school bathrooms that match their gender identity.

Louise Melling, deputy legal director of the American Civil Liberties Union, in a statement, described the Justice Department's brief in the Masterpiece Cake case as “shocking.”

“This Justice Department has already made its hostility to the rights of LGBT people and so many others crystal clear,” Melling said. “But this brief was shocking, even for this administration. What the Trump administration is advocating for is nothing short of a constitutional right to discriminate.”

The Masterpiece Cakeshop case, which has not yet been scheduled for arguments, is one of the new Supreme Court term's most closely watched cases. Although the petition was filed on July 22, 2016, the case lingered on the docket for nearly a year before the justices on June 26 announced they would hear the case.

Speculation abounded that the reason for the lengthy delay was because the court was reluctant to wade into what would be a contentious case during the presidential campaign. Any action by the justices also was complicated by the vacancy on the court following the death last year of Justice Antonin Scalia. After Justice Neil Gorsuch was confirmed, the court said it would review the Masterpiece Cakeshop case.

The Colorado Civil Rights Commission is represented by Colorado Solicitor General Frederick Yarger. The same-sex married couple, Charlie Craig and David Mullins, is represented by Leslie Cooper of the ACLU. Kristen Waggoner of Alliance Defending Freedom represents Phillips.

Although many states include sexual orientation in their anti-discrimination laws, there have been a number of lawsuits in recent years by business owners defending discrimination charges on the basis of their religious beliefs.

Besides the Masterpiece Cakeshop case, a similar Supreme Court petition was filed in July in Arlene's Flowers v. State of Washington, and Ingersoll.

The Washington Supreme Court in that case said the florist, Barronelle Stutzman, had engaged in sexual orientation discrimination under the Washington Law Against Discrimination by refusing to create custom floral arrangements for a same-sex marriage. Stutzman claimed a conflict with her religious beliefs.

Other recent cases raising religious belief defenses have involved owners of lodging, wedding dress shops, photography services, medical practices and students training to be mental health professionals.