WASHINGTON ― The Department of Justice told the Supreme Court on Thursday that a baker who is religiously opposed to gay marriage should not be forced to make wedding cakes for same-sex couples.

DOJ said that requiring Jack Phillips, the owner of Masterpiece Cakeshop in Colorado, to create a wedding cake for a gay couple under public accommodations laws would violate his constitutional rights.

“Forcing Phillips to create expression for and participate in a ceremony that violates his sincerely held religious beliefs invades his First Amendment rights,” the Justice Department wrote in an amicus brief filed ahead of oral argument in the case. “In the view of the United States, a ... First Amendment intrusion occurs where a public accommodations law compels someone to create expression for a particular person or entity and to participate, literally or figuratively, in a ceremony or other expressive event.”

Businesses and other places that are considered “public accommodations” are barred by law from discriminating against people on the basis of factors like race and religion. The DOJ brief suggests that such laws should not be able to compel artists to create “inherently communicative” goods, like wedding cakes.

DOJ’s filing raises the possibility that if the Masterpiece Cakeshop can’t refuse to bake a cake for the marriage of a same-sex couple, then a freelance graphic designer who designs flyers for Jewish affinity groups might also be forced to do so “for a neo-Nazi group or the Westboro Baptist Church.”

Jack Phillips stands before a display of his wedding cakes at the Masterpiece Cakeshop in September 2016. (Photo: Matthew Staver/The Washington Post via Getty Images)

“A custom wedding cake can be sufficiently artistic to qualify as pure speech, akin to a sculptural centerpiece,” the Justice Department wrote. “In short, a custom wedding cake is not an ordinary baked good; its function is more communicative and artistic than utilitarian.”

If forced to create such a cake for a gay couple, the DOJ brief argues, Phillips would be required to essentially “participate in a wedding celebration that conflicts with his sincerely held religious beliefs.”

Story continues

The Justice Department also noted that, at the time Phillips refused to make the cake for David Mullins and Charlie Craig in July 2012, the state of Colorado did not recognize same-sex marriages.

“In other words, the State itself did not acknowledge the validity of the union it sought to compel petitioners to celebrate,” DOJ wrote. “Especially given that background, the State has not advanced a sufficient state interest to override petitioners’ weighty First Amendment interest in declining to create the expression at issue here.”

In a statement, a Justice Department spokeswoman said the amicus brief was filed to protect the free expression of all Americans.

“Although public-accommodations laws serve important purposes, they ― like other laws ― must yield to the individual freedoms that the First Amendment guarantees,” said spokeswoman Lauren Ehrsam. “That includes the freedom not to create expression for ceremonies that violate one’s religious beliefs.”

Louise Melling, deputy legal director for the American Civil Liberties Union, said the brief “was shocking, even for this administration.” She said the Trump administration “is advocating for nothing short of a constitutional right to discriminate.”

Read the Justice Department’s filing below.

Love HuffPost? Become a founding member of HuffPost Plus today.

This article originally appeared on HuffPost.