Anti-LGBTQ activists just suffered their worst defeat since the Supreme Court’s marriage equality decision—a rout so stinging and decisive that it calls into question the viability of their entire strategy post-Obergefell.

That drubbing came in the form of an astonishing 60-page opinion by U.S. District Judge Carlton W. Reeves blocking every single part of Mississippi’s sweeping, vicious anti-LGBTQ segregation law from taking effect. The law, HB 1523, granted special protections to three religious beliefs: Those who oppose same-sex marriage; those who oppose sex outside of marriage; and those who dislike trans and gender-nonconforming people. Starting July 1, HB 1523 would have allowed religious landlords to evict gay and trans renters; permitted religious employers to fire workers for being LGBTQ; granted state and private adoption agencies the right to turn away same-sex couples; allowed private businesses to refuse service to LGBTQ people; given doctors a right to refuse to treat LGBTQ people in most circumstances; and permitted clerks to refuse to marry same-sex couples.

Hours before HB 1523 was set to take effect, Reeves issued an injunction, holding that the law, in its entirety, violates both the Equal Protection Clause and the Establishment Clause. (Reeves had already halted the clerk-specific portion of the bill.) His decision marks a momentous occasion—the first time a federal judge has found that so-called “religious liberty” bills, designed to disadvantage LGBTQ people, violate the U.S. Constitution. Reeves’ opinion is worth paying careful attention to; its findings and logic are certain to be invoked in similar decisions across the country in the coming years.

The genius of the lawsuit against HB 1523, which was brought by Windsor mastermind Roberta Kaplan and the Mississippi Center for Justice, is its fusion of fundamental yet typically distinct constitutional principles: “the guarantee of religious neutrality and the promise of equal protection of the laws.”* Mississippi argued that its law promoted religious liberty. Quite the opposite, Reeves explains: In reality, HB 1523 “establishes an official preference for certain religious beliefs over others,” a quintessential violation of the Establishment Clause. Anti-LGBTQ religious beliefs are explicitly favored; adherents to those beliefs receive a special right to discriminate that is unavailable to all others. “Persons who hold contrary religious beliefs are unprotected,” Reeves explains; “the State has put its thumb on the scale to favor some religious beliefs over others.”

This favoring of certain religious sects is especially problematic because it “comes at the expense of other citizens,” namely LGBTQ people. The Supreme Court has found that laws that advance religious beliefs in a way that burdens those who don’t share those beliefs violate the Establishment Clause. HB 1523 is guilty of this sin, because it gives anti-LGBTQ Mississippians “an absolute right to refuse service to LGBT citizens without regard for the impact on their employer, coworkers, or those being denied service.”

By uniquely burdening the LGBTQ community, Reeves notes, HB 1523 also violates the Equal Protection Clause of the 14th Amendment. Under the Supreme Court’s decision in Romer v. Evans, laws motivated by “animus” toward sexual minorities are unconstitutional. And as Reeves demonstrates in his decision, it is beyond rational belief that HB 1523 was motivated by anything but “a bare desire to harm” LGBTQ people. Reeves charts the legislative history of the law, noting that its sponsors and supporters repeatedly declared that its purpose was to legalize discrimination against sexual and gender minorities. These legislators were surprisingly honest about their aversion toward LGBTQ people. The speaker of the House stated that Obergefell was “in direct conflict with God’s design for marriage as set forth in the Bible” and declared, “I don’t care what the Supreme Court says.” Other representatives called HB 1523 “balancing legislation” to Obergefell, “very specific to same-sex marriage,” intended to relegate LGBTQ Mississippians to second-class citizenship once again.

The text and history of HB 1523, Reeves writes, clearly “indicate that the bill was the State’s attempt to put LGBT citizens back in their place after Obergefell.”

Under the guise of providing additional protection for religious exercise, HB 1523 creates a vehicle for state-sanctioned discrimination on the basis of sexual orientation and gender identity. … The majority of Mississippians were granted special rights to not serve LGBT citizens, and were immunized from the consequences of their actions. LGBT Mississippians, in turn, were “put in a solitary class with respect to transactions and relations in both the private and governmental sphere” to symbolize their second-class status. As in Romer, Windsor, and Obergefell, this “status-based enactment” deprived LGBT citizens of equal treatment and equal dignity under the law.

“The deprivation of equal protection of the laws is HB 1523’s very essence,” Reeves concludes. “It violates the Fourteenth Amendment.”

Mississippi is almost certain to appeal this ruling to the U.S. Court of Appeals for the 5th Circuit, which leans conservative. But Reeves’ ruling is essentially bulletproof, on everything from technical issues like standing—Kaplan and the Mississippi Center for Justice found the perfect plaintiffs, religious leaders who are disfavored by HB 1523—to broad constitutional questions like equal dignity. His opinion is largely a recitation of well-established Supreme Court decisions, highlighting their stark relevance to HB 1523. This is a landmark ruling, one whose breadth, depth, and analytical incisiveness cannot be easily rebuked. Reeves has given LGBTQ advocates their biggest triumph since Obergefell. Any state looking to pass a similar anti-LGBTQ “religious liberty” law has now been warned: The Constitution will not tolerate your efforts to discriminate against LGBTQ people under the feeble guise of selective religious freedom.

*Update: This post has been updated to reflect the work of the Mississippi Center for Justice in the litigation against HB 1523.