Updated

The Justice Department on Thursday filed a brief supporting the Colorado baker who refused to bake a wedding cake for a gay couple on faith-based grounds, in the latest religious freedom case to be considered before the nation's highest court.

Jack Phillips, owner of Masterpiece Cakeshop, had refused to sell a customized cake for a gay couple's union, claiming a religious exemption to the state's anti-discrimination law.

“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,” Acting Solicitor General Jeffrey B. Wall wrote in the brief.

Wall added, “Forcing Phillips to create expression for and participate in a ceremony that violates his sincerely held religious beliefs invades his First Amendment rights.”

The Supreme Court announced in June it will hear the Masterpiece Cakeshop v. Colorado Civil Rights Commission case. State courts had ruled against the businessman.

The high court will now decide whether applying Colorado's public accommodations law to compel the baker to create "expression" -- a wedding cake -- violates his constitutionally protected Christian beliefs about marriage.

“I never thought the government would try to take away my freedoms and force me to create something that goes against my morals,” Phillips told Fox News on Thursday.

The American Civil Liberties Union on Thursday accused the Trump administration, through the DOJ brief, of advocating for “nothing short of a constitutional right to discriminate.”

“This Justice Department has already made its hostility to the rights of LGBT people and so many others crystal clear,” Louise Melling, the deputy legal director of the ACLU, said in a statement. “But this brief was shocking, even for this administration.”

Backers of Phillips, like Utah Republican Sen. Mike Lee, though, call it a “freedom of expression case” that “extends far more broadly than a religious liberty case.”

“What matters is how our laws can be brought to bear against those who believe,” Lee said Thursday. “The government cannot force you to speak where you would choose to remain silent. These are foundational pillars of Constitution.”

SUPREME COURT TO HEAR CASE OF BAKER’S REFUSAL TO MAKE WEDDING CAKE FOR GAY COUPLE

Phillips has told the Supreme Court he has free speech and religious rights under the First Amendment that should protect him. He said he should not be compelled to bake a cake specifically to honor a same-sex marriage.

Colorado's anti-discrimination law, though, protects people on the basis of their sexual orientation. Charlie Craig and David Mullins had filed a complaint against Phillips and his suburban Denver shop after Phillips said he would not create and decorate a cake in honor of their marriage.

Colorado did not permit same-sex couples to marry until 2014. Two years earlier, Craig and Mullin were planning to fly to Massachusetts, where same-sex marriage was legal, and host a reception in Denver upon their return to Colorado. They wanted a cake for the occasion.

The case will be another in a series of "religious liberty" disputes the justices have reviewed in recent years, and could be an important First Amendment test of the extent anti-discrimination laws apply to gay Americans.

Oral arguments will likely be held in court's term beginning in the fall.

Fox News’ Bill Mears and Alex Pappas contributed to this report.