WASHINGTON — The Supreme Court ruled Friday in favor of an evangelical Christian web designer from Colorado who refuses to work on same-sex weddings.

The judges, divided 6-3, said that Lorie Smith, as a creative professional, is entitled to free speech under the First Amendment of the Constitution to refuse to endorse messages with which she disagrees. As a result, she cannot be punished under Colorado anti-discrimination law for refusing to design websites for gay couples, the court said.

The ruling could allow other similar business owners to evade punishment under laws in 29 states that protect LGBTQ rights in public places in some way. The remaining 21 states do not have laws explicitly protecting LGBTQ rights in public places, although some local municipalities do.

“The First Amendment views America as a rich and complex place, where all people are free to think and speak as they choose, not as the government requires,” Judge Neil Gorsuch wrote for the court.

Smith, who opposes same-sex marriage on religious grounds and runs a website design business, sued the state in 2016 because he said he would like to accept clients planning opposite-sex weddings, but decline applications. made by same-sex couples who want the same service. . She argued that, as a creative professional, she has the right to free speech to refuse to do work that conflicts with her views.

Civil rights groups said Smith was asking the conservative-majority court for a «license to discriminate» that would strike down public accommodations laws that require businesses to serve all customers.

December’s oral argument presented a colorful array of what-if questions as the justices wrestled with the potentially wide-ranging implications of the case. At one point, conservative Justice Samuel Alito questioned whether a «black Santa» in a mall would be required to have his photo taken with a child dressed in a Ku Klux Klan outfit.

The case was the latest example of the conflict over the Supreme Court’s own 2015 ruling legalizing same-sex marriage, which is opposed by conservative Christians even as Congress moved to enact legislation with bipartisan support that strengthens protections for same-sex married couples.

Smith, whose business is called 303 Creative, told NBC News that she has always been drawn to creative endeavors, but also has a strong belief that «marriage is between a man and a woman, and that union is important.» .

Smith sued the Colorado Civil Rights Commission and other state officials over concerns that she could be penalized under its anti-discrimination law that prohibits discrimination based on sexual orientation in public places, although she has not yet been penalized. Lower courts ruled against Smith, prompting her to appeal to the Supreme Court.

The case gave the court a second bite in a legal issue it considered but never resolved when it ruled in a similar case in 2018 in favor of a Christian baker, also from Colorado, who refused to bake a wedding cake for a couple. gay. The court then ruled that the baker, Jack Phillips, did not receive a fair hearing before the state Civil Rights Commission because there was evidence of anti-religious bias.

State officials said in court documents that they had never investigated Smith and had no evidence that someone had asked him to create a website for a same-sex wedding. Colorado Attorney General Eric Olson wrote that there is a long tradition of public accommodation laws that protect the ability of all people to obtain goods and services.

Smith, like Phillips before her, is represented by Alliance Defending Freedom, a conservative Christian legal group, which has had success arguing religious rights cases in the Supreme Court in recent years.

The Supreme Court ruled on the baker’s case before the retirement of Justice Anthony Kennedy, who voted for LGBTQ rights in key cases. Now, after three appointments by then-President Donald Trump, the court has six conservative and three liberal justices.

Kennedy was in the majority when the court legalized gay marriage in a 5-4 vote. In another huge victory for LGBTQ rights, the Supreme Court in 2020, to the surprise of many court watchers, ruled that a federal law that prohibits sex discrimination in employment protects LGBTQ employees.

A year later, the court ruled in favor of a Catholic Church-affiliated agency that the city of Philadelphia had excluded from its foster care program because of the church’s opposition to same-sex marriage. In other cases, in recent years, the conservative majority has consistently endorsed religious rights.