WASHINGTON — The Supreme Court will hear oral arguments in a case Tuesday that asks whether a baker in Colorado can legally ignore his state’s nondiscrimination law by refusing, on religious grounds, to bake a wedding cake for a same-sex couple.

The high court’s decision, expected by late June, could send shockwaves through the wedding vendor and gay communities by either boosting or shutting down the claims of several other florists, photographers, bakers, and wedding venue providers who say they should be able to turn away gay customers due to their personal religious beliefs. Just 21 states, including Colorado, prohibit businesses from discriminating against gay people — in all other states, it’s legal to do so.

The case, Masterpiece Cakeshop vs. Colorado Civil Rights Commission, marks the first time the Supreme Court will consider a person’s religious objections to same-sex marriage since the court found in 2015 that a right to marriage extended to gay people. That decision struck down bans on gay marriage in 13 states.

“This case is not really about a cake,” starts one amicus brief by a gay rights advocacy group siding with the same-sex couple.

That might be the only thing on which both sides agree.

Attorneys for the baker, Jack Phillips — as well as the U.S. government and conservative religious groups — argue that Phillips’s cake is much more than food: It’s art and thus protected free speech the government may not infringe upon.

A cake is “not an ordinary baked good; its function is more communicative and artistic than utilitarian,” the Justice Department writes in its brief in the case. The baker himself argues that his case is about the “expressive freedom of all who create art or other speech for a living.”

A brief by a group of nearly 100 Republican U.S. lawmakers, including Sen. Ted Cruz of Texas, referenced the reality TV show “Cake Wrecks” and described Prince William and Kate Middleton’s elaborate 2012 wedding cake to argue that “asking an artist to especially design a cake to capture the appropriate emotions of a wedding day is more than a request for a food with flour, eggs, and sugar.” Instead, the cake is a “message” of endorsement for a same-sex union, something Phillips says he cannot do in good conscience because of his Christian religion.

Meanwhile, gay rights groups, the ACLU, and attorneys for the couple Phillips turned away, Charlie Craig and David Mullins, say the baker’s refusal to make them a cake is tantamount to hanging a “heterosexuals only” sign outside his shop.

“The fact that you might have to take down a sign that says “whites only” doesn’t mean it’s a case about speech,” argues Louise Melling, deputy legal director at the ACLU. Melling compared Phillips’s objections to those made by business owners in the 1960s after civil rights laws were passed. They said their religious objections to serving black people superseded the government’s interest in preventing discrimination. They were found wrong then and will be found wrong now, she argues.

And some academics are skeptical of Phillips’s claim that what he does is protected speech.

“I question whether baking a cake is really expressive activity,” said Erwin Chemerinsky, dean of UC Berkeley’s law school. “I bake all the time, but I don’t think I’m engaging in speech when I do it. If baking a cake is expressive activity then so is virtually any work.”

David Mullins and Charlie Craig, who are now married, on Nov. 28. (Photo: Rick Wilking/Reuters)

Several legal experts have argued that if the Supreme Court finds that baking a cake is expression and is thus protected from Colorado’s anti-discrimination statute, then nearly every person involved in the wedding industry — or any industry — could argue they have a right to refuse to serve gay people.

Conservative religious groups are hoping for exactly that kind of broad ruling that would allow any wedding vendor to opt out of a gay wedding in states with anti-discrimination statutes.

“If the court rules for Jack Phillips, well he’s a baker so does that mean a photographer is protected, or a florist?” asked Travis Weber, the director of the Center for Religious Liberty at the Family Research Council, which advocates for religious business owners’ right to refuse to serve gay couples. “We have significant cases involving those. There really needs to be clarity here — freedom for these individuals.”

But the federal government, in a brief siding with the baker, explicitly contrasted cake making with renting out a venue or limousine to a same-sex couple, which it said did not count as an endorsement of their union and thus would not violate vendors’ religious beliefs. The government may be hoping the court will issue a narrow ruling specifically dealing with bakers without needing to provide a broad loophole for anyone who doesn’t want to serve gay people.

Melling of the ACLU said she did not believe the government’s narrow reading of the case would persuade the justices. If baking a cake is expression, so is virtually anything else in the wedding industry.

“Think of all the different kinds of services that have a fundamentally expressive aspect,” she said. “The interior decorator who provides the lighting and mood, the caterer who chooses how the food will be plated or displayed on the buffet. Not to mention the florist, the wedding invitation makers.”

“The government’s brief reads like this is only for wedding cakes. But that’s not a neutral principle,” she said.

Court watchers will keep a close eye on Justice Anthony Kennedy during Tuesday’s oral argument, as he could end up being the deciding vote. Kennedy, a conservative justice, has been a swing vote in major cases, including the 2015 decision that struck down gay marriage bans. He also wrote a landmark opinion in 2003 that prevented states from criminalizing sex among gay people.

Justice Anthony Kennedy in April. (Photo: Eric Thayer/Getty Images)

“I think the key is Justice Kennedy,” Chemerinksy said. “He’s the justice that’s written every court opinion in history advancing rights for gays and lesbians.”

But Kennedy has also been drawn to arguments about the need to protect free speech and religious freedom. He joined the majority in Citizens United, arguing that government restrictions on corporations’ election spending and communications violated their free speech.

“If there’s one area where [the conservative Supreme Court justices have been strongest on and most notable for, it has been the First Amendment, and that’s something that in particular Justice Kennedy is interested in,” says Carrie Severino, policy director of the Judicial Crisis Network, a conservative legal organization. “It will be interesting to see where he comes out.”