WASHINGTON — The Supreme Court is taking up the highly anticipated case of the Colorado baker who refused to make a wedding cake for a same-sex couple.

Tuesday’s clash at the high court pits baker Jack Phillips’ First Amendment claims of artistic freedom against the anti-discrimination arguments of the Colorado Civil Rights Commission, and two men Phillips turned away in 2012.

The commission ruled that Phillips violated the state’s anti-discrimination law when he refused to make a wedding cake for Charlie Craig and David Mullins.

A wedding cake in rainbow colours and decorated with two same-sex couples.TOBIAS SCHWARZ/AFP/Getty Images

The argument is the first involving gay rights since the Supreme Court ruled in 2015 that states could not prevent same-sex couples from marrying.

The Trump administration is supporting Phillips in his argument that he can’t be forced to create a cake that violates his religious beliefs. It appears to be the first time the federal government has asked the justices to carve out an exception from an anti-discrimination law.

The case’s outcome also could affect photographers and florists who have voiced objections similar to those of Phillips.

In this Nov. 28, 2017, photo, Charlie Craig and David Mullins are shown in their home in Denver.David Zalubowski/AP

“Artists shouldn’t be forced to express what the government dictates. The commission ordered Jack to celebrate what his faith prohibits or to stop doing the work he loves. The Supreme Court has never compelled artistic expression, and doing so here would lead to less civility, diversity, and freedom for everyone, no matter their views on marriage,” Kristen Waggoner, the Alliance Defending Freedom who is representing Phillips, said in an email.

But the American Civil Liberties Union and other rights groups that have sided with the gay couple said they fear a ruling for Phillips could allow for discrimination by a range of business owners. They said the court has never recognized what they call a constitutional right to discriminate.

“The question is whether a shop like Masterpiece Cakeshop can put up a sign in its window saying, ‘Wedding cakes for heterosexual couples only,”‘ ACLU deputy legal director Louise Melling said. The ACLU is representing Craig and Mullins.

Jack Phillips, owner of Masterpiece Cake, speaks during a rally on the campus of a Christian college Wednesday, Nov. 8, 2017, in Lakewood, Colo.David Zalubowski/Associated Press

All eyes will be on Justice Anthony Kennedy, whose vote often decides cases that otherwise split the court’s liberals and conservatives. The 81-year-old Kennedy is the author of the 2015 gay marriage decision and all the court’s major gay-rights rulings. At the same time, Kennedy has forcefully defended free-speech rights in his nearly 30 years as a justice.

Colorado native Neil Gorsuch also will be taking part in the most important gay rights case since he joined the Supreme Court in April.

Colorado is among only 21 states that have statewide laws barring discrimination against gays and lesbians in public accommodations.

The case, Masterpiece Cakeshop v. Colorado Civil Rights Commission, 16-111, will be decided by late June.