Washington (CNN) The Trump administration is backing a Colorado baker who refused to create a cake for the wedding of a same-sex couple.

The case -- one of the most important to be heard this term -- pits advocates for religious liberty against supporters of LGBT rights.

In a friend-of-the-court brief filed with the Supreme Court, the Justice Department urged the court to side with Masterpiece Cakeshop owner Jack Phillips, who says making a cake for a same-sex couple violates his religious liberty.

"Forcing Phillips to create expression for and participate in a ceremony that violates his sincerely held religious beliefs invades his First Amendment rights," Acting Solicitor General Jeff Wall wrote for the Justice Department.

"The government may not enact content-based laws commanding a speaker to engage in protected expression: An artist cannot be forced to paint, a musician cannot be forced to play, and a poet cannot be forced to write," the brief adds.

Read More