Updated

A constitutional fight over a wedding cake drew hundreds of activists on both sides to the Supreme Court on Tuesday, in a hot-button case pitting religious and artistic conviction against discrimination targeting the LGBT community.

The justices heard nearly 90 minutes of spirited oral arguments, appearing equally divided along ideological lines over perhaps the most-closely watched appeal so far this term-- whether applying Colorado's public accommodations law to compel a local baker to create commercial "expression" violates a business owner's constitutionally protected Christian beliefs about marriage.

Charlie Craig and David Mullins of Denver visited Masterpiece Cakeshop in July 2012 to buy a custom-made wedding cake. Owner Jack Phillips abruptly refused his services when told it was for a same-sex couple. A state civil rights commission sanctioned Phillips after a formal complaint from the gay couple.

Legal questions over compelled speech, expressive content, and societal tolerance placed the nine-member bench squarely in the middle of a culture war debate-- competing claims involving religion and gay rights.

"If you want to be a part of our community, of our civic community, there's certain behavior, conduct you can't engage in," said Justice Sonia Sotomayor. "And that includes not selling products that you sell to everyone else to people simply because of either their race, religion, national origin, gender, and in this case sexual orientation. So we can't legislate civility and rudeness, but we can and have permitted it as a compelling state interest legislating behavior."

"One thing that's disturbing about the record here," said Justice Samuel Alito about the commission's decisions, "is what appears to be a practice of discriminatory treatment based on viewpoint."

Justice Anthony Kennedy, the so-called swing vote, again appeared key to deciding this appeal. He asked tough questions of both sides.

"If you prevail, could the baker put a sign in his window, we do not bake cakes for gay weddings?" he asked the lawyer for Phillips. "And you would not think that an affront to the gay community?"

But later in the argument, he said: "Tolerance  is essential in a free society. And tolerance is most meaningful when it's mutual. It seems to me that the state in its position here has been neither tolerant nor respectful of Mr. Phillips' religious beliefs."

Craig and Mullins met on blind date in late 2010, and decided to get married a couple of years later. Since Colorado did not permit it at the time, they tied the knot in Massachusetts. While planning for a hometown reception with friends and family, the two decided to visit Phillips' small shop in a Denver suburb.

Along with Craig's mother and a book of ideas, they met with Phillips for just 20 seconds by the owner's account, when he said he told them, "Guys, I don't make cakes for same-sex weddings."

"What followed was a horrible pregnant pause during which what was happening really sunk in and we were mortified and embarrassed," Mullins told Fox News. "We teared up. It was a very painful and emotional moment for us."

The Trump administration to a large extent backs Phillips, and legal experts say it is the first time the federal government has asked for an exception to an anti-discrimination law.

Phillips is represented in court by the Alliance Defending Freedom, a conservative Christian nonprofit. He has since lost at every step in the legal appeals process, and said the legal fight brought "many difficult days."

"We've faced death threats and harassment, I have had to stop creating the wedding art that I loved, which means we lost much of our business," he said after the case was argued. "It's hard to believe that the government is forcing me to choose between providing for my employees and violating my relationship with God. That is not freedom, that is not tolerance."

With competing rallies in front of the court, Phillips supporters carried signs including "We Got Jack's Back" while those on the opposing side held banners proclaiming "Don't Discriminate" and "Love Wins."

"This has never been about a cake, this isn't about wedding," Mullins told the crowd. "This is about freedom. Freedom for LGBT people to live full lives in public and not to be denied basic services in businesses, fired from jobs or lose homes just for who they are."

The court explored how their ruling might affect others like florists, hair stylists, wedding planners and others who might object to same-sex unions on religious grounds.

Some justices worried what a ruling for Phillips might mean for other creative pursuits, like architects, furniture makers, filmmakers, even sandwich "artisans."

"So in other words, Mies [Ludwig Mies van der Rohe, a German-American architect] or Michelangelo is not protected when he creates the Laurentian steps, but this cake baker is protected when he creates the cake without any message on it for a wedding?" asked Justice Stephen Breyer. "Now, that really does baffle me, I have to say."

Chief Justice John Roberts expanded the rim of the possible.

"So Catholic Legal Services," which he said might want to help the poor, "would be put to the choice of either not providing any pro bono legal services or providing those services in connection with the same-sex marriage?" which in the hypothetical, "they say we're not going to do it because, as a religious matter, we're opposed to same-sex marriage."

The case is Masterpiece Cakeshop, Ltd. v. Colorado Civil Rights Commission (16-111). A ruling is expected by June 2018.