The U.S. Supreme Court case of a Colorado baker who refused to make a cake for a same-sex couple because gay marriage was against his religious beliefs could change how Philadelphia and places across the country enforce laws that protect LGBT people from discrimination.

A ruling in favor of the baker — depending on its scope — has the potential to weaken those city and state laws and make governments less likely, or less able, to pursue cases in which religion and sexual orientation clash. Justices heard the case Tuesday and could decide it by late June.

"The business in this case is claiming that the Constitution gives it a right to discriminate, even when state law makes that discrimination illegal," said Tobias Barrington Wolff, a professor at the University of Pennsylvania Law School who filed an amicus brief in opposition of the baker's actions. "If they win on that claim, then other businesses could try to assert the same defense when cities or states enforce their antidiscrimination laws."

New Jersey and 20 other states prohibit businesses from denying service due to a person's sexual orientation. While Pennsylvania does not prohibit that, Philadelphia does. The city's Commission on Human Relations also has the power to temporarily shut down businesses that repeatedly violate the law.

"The country has been making progress for decades in creating civil rights laws that protect oppressed groups of people," said Rue Landau, the commission's executive director.  "If the Supreme Court decides in favor of the baker in this case, they're going to be reversing much of that work."

The case goes back to 2012, when Dave Mullins and Charlie Craig stopped in the Lakewood, Colo., shop of Christian baker Jack Phillips. In a brief exchange, Phillips said he could sell the couple other goods, but not a wedding cake, because same-sex marriage ran against his religious beliefs. The couple filed a complaint with the Colorado Civil Rights Commission, which sided with them.

After Tuesday's arguments, justices appeared divided. The impact on antidiscrimination laws will depend not just on whether the justices decide in favor of the baker, but why. Rutgers-Camden law professor Perry Dane, a former clerk to U.S. Supreme Court Justice William Brennan, offered some possible outcomes:

The Supreme Court rules in favor of the baker based on his right to free speech.

  • This would be a blow to the LGBT community. It means a business could object to serving a same-sex couple, even if that objection isn't rooted in religious beliefs. On the flip side, the court could rule that commercial businesses are in the public realm and must serve any customer, regardless of an owner's personal beliefs. In that case, "The bakers who object to neo-Nazis would also lose, presumably," Dane said. He considers both of these outcomes unlikely, because they are so broad.

The court rules in favor of the baker based on his right to free exercise of religion, but not free speech.

  • This means a business owner or employee's objections must be religiously-based.

The court rules in favor of the baker based on either free speech or religion exercise rights, but only when it pertains to custom-made goods.

  • This means a business can deny service only for custom-made goods (in this case, a custom-made wedding cake), but not for products that are already available or on the shelves.

The court rules in favor of the baker based on either free speech or religion exercise rights, but only when it pertains to same-sex weddings.

  • This means a business can refuse to sell a product for a same-sex marriage or a related event, such as a wedding anniversary, but cannot deny service to LGBT people as a whole.

The court rules in favor of the baker, because at least one justice thinks Colorado was intolerant of Phillips' religious beliefs.

  • Justice Anthony M. Kennedy, who could cast the deciding vote in the case, suggested Tuesday that the Colorado Civil Rights Commission had been "neither tolerant nor respectful of Mr. Phillips' religious beliefs." In this scenario, any businesses reprimanded for denying service to a same-sex couple would have to prove they were being reprimanded because a municipality, or state, was intolerant of their religious beliefs. Simply denying service on religious grounds wouldn't be enough to protect a business.

The court rules in favor of the couple and upholds the government's ability to enforce the antidiscrimination laws that prevent businesses from denying service based on a person's sexual orientation.

  • This is a broad ruling and a win for LGBT rights. It's a loss, however, for business owners who object to same-sex marriage on religious grounds.

Dane said he expects a more narrow ruling — one that may not be as extreme as each side fears.

"Even if [the justices] ruled in favor of the baker, there would be some important effort to draw the lines that keep more general antidiscrimination laws in place," Dane said.

President Trump's administration has supported 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 antidiscrimination law.

The Associated Press contributed to this article.