The lawsuit was brought by anti-LGBT hate group and legal power house Alliance Defending Freedom (ADF), which works to criminalize same-sex relationships in the U.S. and abroad.

Over the years, ADF has linked homosexuality to pedophilia and repeatedly claimed a nefarious “homosexual agenda” is afoot that will damage or destroy society. The organization is currently engaged in lawsuits around the country that attack LGBT rights on three fronts. ADF is seeking to:

1. marginalize trans people from using public facilities in accordance with their gender identities in so-called “bathroom bills,”

2. enshrine discrimination against LGBT people on state and local levels through so-called “religious freedom” laws, and

3. remove anti-discrimination ordinances that include sexual orientation and gender identity.

ADF has spent years crafting and mainstreaming a legal narrative asserting that certain conservative Christians feel they are being persecuted by LGBT people, reproductive rights groups, and secular schools and universities. Because of that, ADF’s narrative goes, these Christians should be able to disregard, disobey and dismantle laws that protect those rights in order to protect their rights to free speech and religion.

The Masterpiece Cakeshop lawsuit provides a high-profile example of ADF’s strategy at work, though it did not entirely pay off. ADF claimed that a Christian baker was actually the person who was discriminated against when he refused to serve a same-sex couple. What he did — denying a public service on the basis of sexual orientation — was not discriminatory toward the couple, but rather an expression of his religious freedom and free speech.

The lawsuit stemmed from a 2012 complaint made by gay couple Charlie Craig and David Mullins, who visited the Masterpiece Cakeshop in Colorado to order a cake for their wedding reception. At the time, same-sex marriage in Colorado was illegal, but the couple was marrying in Massachusetts (where it was legal to do so). The bakery owner, Jack Phillips, refused their request. He told the couple that, as a devout Christian, he would not provide his services for a same-sex wedding because such a celebration was against his religious convictions. Craig and Mullins thus filed a complaint with the Colorado Civil Rights Commission (CCRC) alleging Phillips had violated the Colorado Anti-Discrimination Act, which forbids businesses that serve the public from denying service to someone based on sexual orientation.

Four governing bodies in Colorado ruled in favor of Craig and Mullins, including the CCRC and the Colorado Court of Appeals. ADF took Phillips’ case after Craig and Mullins filed their complaint and argued that it wasn’t the gay couple Phillips objected to, but rather the message one of his cakes would send about marriage. ADF petitioned the Supreme Court in 2016 to hear Phillips’ case, which they agreed to in June 2017.

The lawsuit pitted Phillips against the CCRC, alleging the latter had discriminated against the former because of his religion. This week the Supreme Court handed down its decision, ruling in favor of the baker and against the CCRC by a 7-2 margin, overturning the decision of the lower courts and finding that the CCRC acted with undue bias against Phillips’ religious beliefs.

The grounds of the decision were narrow, limited to the very specific circumstances of the case. In the majority opinion, drafted by Justice Anthony Kennedy, the court found that in assessing Phillips’ religious objections, the CCRC failed to give his beliefs “neutral and respectful consideration” and therefore violated his right to free exercise of religion. To make his point, Kennedy cited two specific comments made by a CCRC commissioner, as well as the body’s earlier decisions in favor of three other bakeries that declined to make cakes with anti-LGBT messages.

The strict limitations of the ruling haven’t prevented an outpouring of overbroad interpretations that trumpet the decision as a license to discriminate. A Tennessee business owner who was required in 2015 to remove a sign in his window that read, “No Gays Allowed” put the sign back up this week in celebration. The religious right lauded the decision, and many leaders were quick to overstate the implications of the ruling. Bryan Fischer, of the American Family Association, cheered the news as “a huge win for religious liberty.” He said Phillips had declined to make the cake for a “sodomy-based ‘marriage’” on “the constitutionally protected grounds that it would violate his conscience to do so.” The court made no such determination about the constitutionality of Phillips’ refusal.

In his opinion, Justice Kennedy underscored the importance of establishing a balance that preserves the rights of LGBT Americans, writing, “Our society has come to the recognition that gay persons and gay couples cannot be treated as social outcasts or as inferior in dignity and worth…The exercise of their freedom on terms equal to others must be given great weight and respect by the courts.”

In fact, an Arizona court this week cited the Masterpiece Cakeshop decision in its ruling that a calligraphy company based in Phoenix cannot refuse service to same-sex couples.

Masterpiece Cakeshop was closely watched because it exemplifies a larger legal and political battle about LGBT rights in the U.S. In recent years, anti-LGBT groups have sought to chip away at civil rights gains for LGBT Americans by seeking religious exemptions and claiming their right to free exercise of religion supersedes the rights of LGBT people to equal legal protection. ADF is at the vanguard of this political strategy.

When ADF lawyers argued Phillips’ case before the Supreme Court, they didn’t call him a baker, but rather a “cake artist,” and argued he should be free to deny service to LGBT customers not only because of his religion, but because of his right to free speech and expression. If he is an artist, not a business owner providing a service, then each baked good is an act of personal expression, not merely a commercial product.

Though the court handed ADF a win this week, Kennedy’s opinion focused squarely on unique aspects of the case and did not address the larger issue of whether LGBT people can legally be denied goods and services by people claiming religious beliefs against them. While Kennedy ruled the CCRC had violated Phillips’ right to free exercise of religion, he also wrote explicitly, “it is a general rule that [religious and philosophical] objections do not allow business owners and other actors in the economy and in society to deny protected persons equal access to goods and services.”

The court did not rule on the question of ADF’s free speech claims at all.

But the Masterpiece Cakeshop case was just one of many on ADF’s docket that could enshrine religious exemptions or free expression claims as a license to discriminate against LGBT Americans. And Kennedy’s opinion, which relies heavily on his perception of CCRC’s hostility toward Christianity, provides ADF with a narrative victory.

ADF’s strategy to link anti-gay discrimination to freedom of speech is not going away any time soon. Justice Clarence Thomas, in a concurring opinion, threw his support behind that legal argument, suggesting it could be used to limit the effect of Obergefell v. Hodges, the decision that made marriage equality the law of the land in 2015. “In future cases,” the conservative justice wrote, “the freedom of speech could be essential to preventing Obergefell from being used to ‘stamp out every vestige of dissent’ and ‘vilify Americans who are unwilling to assent to the new orthodoxy.’”

Borrowing language from Justice Samuel Alito, Thomas may be agreeing with ADF that there is something about marriage equality that is inherently oppressive to certain conservative Christians.

Ultimately, ADF comes out of this fight with yet another strategy to erode LGBT rights. The court decided to reverse the ruling of four different government bodies based primarily on the comments of one or two individuals involved. ADF attorney Kristen Waggoner, who argued Phillips’ case in court, told reporters after the decision that the lawyers for the hate group will now look for “any hint of hostility” in order to make their cases.