WASHINGTON (Reuters) – U.S. Supreme Court justices including pivotal jurist Anthony Kennedy on Tuesday posed tough questions to lawyers representing a conservative Christian baker in Colorado who refused to make a wedding cake for a gay couple, but also raised concerns about religious liberty implications in the closely watched case.

FILE PHOTO: Baker Jack Phillips decorates a cake in his Masterpiece Cakeshop in Lakewood, Colorado U.S. on September 21, 2017. REUTERS/Rick Wilking/File Photo

The nine justices heard arguments in the major case on whether certain businesses can refuse service to gay couples if they oppose same-sex marriage on religious grounds.

The argument, which was ongoing, involved an appeal brought by Jack Phillips, a baker who runs Masterpiece Cakeshop in the Denver suburb of Lakewood, of a state court ruling that his refusal violated a Colorado anti-discrimination law.

In one of the biggest cases of the conservative-majority court’s nine-month term, the justices must decide whether the baker’s action was constitutionally protected, meaning he can avoid punishment under the Colorado law.

Phillips, represented by the conservative Christian advocacy group Alliance Defending Freedom, contends that law violated his rights to freedom of speech and free exercise of religion under the U.S. Constitution’s First Amendment. The Supreme Court arguments focused on his free speech claim, based on the idea that creating a custom cake is a form of free expression.

Several of the justices asked questions that suggested they are concerned about how far a ruling in favor of the baker might extend. Liberal Justice Elena Kagan wondered about whether a hairstylist, chef or a makeup artist could refuse service, claiming their services are also speech protected by the Constitution. “Why is there no speech in creating a wonderful hairdo?” Kagan asked.

Kennedy said that many examples of other businesses implicated involved free speech rights. He asked U.S. Solicitor General Noel Francisco, who backed the baker, what would happen if the court rules for the baker and bakers nationwide then started receiving requests to not bake cakes for gay weddings. “Would the government feel vindicated?” he asked.

Kennedy, considered the potential decisive vote in the case, also posed questions about implications for religious liberty.

The couple, David Mullins and Charlie Craig, call the baker’s refusal a simple case of unlawful discrimination based on sexual orientation. Mullins and Craig are represented by the American Civil Liberties Union, which has argued that Phillips’ legal team is advocating for a “license to discriminate” that could have broad repercussions beyond gay rights.

The Supreme Court legalized gay marriage in a landmark 2015 ruling written by Kennedy, one of the court’s five conservatives. The 81-year-old Kennedy, who has joined the court’s four liberals in major decisions on issues such as abortion and gay rights, could cast the deciding vote. Kennedy also is a strong proponent of free speech rights.

A ruling favoring Phillips could open the door for businesses that offer creative services to spurn gay couples by invoking religious beliefs, as some wedding photographers, florists and others already have done. Conservatives have filed other lawsuits also seeking to limit the reach of the 2015 gay marriage ruling.

FILE PHOTO: Gay married couple Charlie Craig (L) and David Mullins pose for a photo in their home in Denver, Colorado, U.S. November 28, 2017. Photo taken November 28, 2017. REUTERS/Rick Wilking/File Photo

‘WE GOT YOUR BACK’

Hundreds of demonstrators on both sides of the dispute rallied outside the white marble courthouse. Supporters of Phillips waved signs that read, “We got your back Jack.” As Mullins and Craig made their way into the courthouse, the two men led their supporters in chants of “Love Wins.”

The case highlights tensions between gay rights proponents and conservative Christians who oppose same-sex marriage, as illustrated in comments made by demonstrators on Tuesday.

“Religious liberty is the most important right we have been given in the Constitution, and this case exemplifies it,” said Paula Oas, 64, a Maryland resident. “I believe Jack is not harming others.”

Sherrill Fields, 67, a lesbian Virginia resident, said she feared that if the court sides with the baker, different types of businesses will turn away gay customers.

“This kind of thing will come out of the woodwork,” Fields said. “People and businesses of all sorts will deny us service. Restaurants, hairdressers, doctors, tow truck drivers, anybody that provides a service.”

The legal fight broke out in 2012 when Phillips told Mullins and Craig that due to his Christian beliefs he would not be able to make a cake to celebrate their wedding.

The two men married in Massachusetts but wanted to celebrate their nuptials with friends in Colorado. At the time, Colorado allowed civil unions but not marriage between same-sex couples.

The couple turned to the American Civil Liberties Union, which filed a complaint on their behalf, saying Phillips had violated Colorado state law barring businesses from refusing service based on race, sex, marital status or sexual orientation.

The Colorado Civil Rights Commission found that Phillips had violated the law and ordered him to take remedial measures including staff training and the filing of quarterly compliance reports. In August 2015, the Colorado Court of Appeals also ruled against Phillips.

The Colorado Supreme Court refused to hear the case, prompting Phillips to appeals to the U.S. Supreme Court.

Reporting by Lawrence Hurley; Additional reporting by Andrew Chung; Editing by Will Dunham