Surprise! Justice on L.G.B.T. Rights From a Trump Judge 1

The new season of my favorite television show, “The Good Fight,” begins with the heroine, the feminist lawyer Diane Lockhart, awakening in what seems at first like a giddy alternative reality in which Hillary Clinton won the 2016 election. She remembers the horrors of the last three and a half years, but no one else seems to. A crushing weight lifts as she convinces herself it was all an awful dream.

Then she is sent to a meeting with her firm’s new client, Harvey Weinstein. There’s been no #MeToo movement. Instead, corporate “lean in” feminism is at its apogee. Diane realizes there have been gains made since Donald Trump took office that are unbearable to give up.

Obviously, a world in which Clinton beat Trump would be better in a million ways. Still, right now we have two big examples of how Trump’s perverse presidency has inadvertently led to progress.

The sudden, rapid embrace of the Black Lives Matter movement by white people is a function of the undeniable brutality of George Floyd’s videotaped killing. But public opinion has also moved left on racial issues in reaction to an unpopular president who behaves like a cross between Bull Connor and Andrew Dice Clay.

And the thrilling 6-3 decision the Supreme Court just issued upholding L.G.B.T. equality wouldn’t be as devastating to the religious right if it had happened under a President Clinton.

Before Monday, you could legally be fired for being gay, bisexual or transgender in 26 states. Now the court has ruled that gay and transgender people are protected by Title VII of the 1964 Civil Rights Act, which prohibits employment discrimination on the basis of sex. The decision has extra cultural force because it was written by Justice Neil Gorsuch, a Trump appointee, and joined by the conservative chief justice John Roberts.

“The whole point of the Federalist Society judicial project, the whole point of electing Trump to implement it, was to deliver Supreme Court victories to social conservatives,” tweeted the conservative writer Varad Mehta. “If they can’t deliver anything that basic, there’s no point for either. The damage is incalculable.”

The phrase “But Gorsuch” is shorthand for how conservatives justify all the moral compromises they’ve made in supporting Trump; controlling the Supreme Court makes it all worth it. So there’s a special sweetness in Gorsuch spearheading the most important L.G.B.T. rights decision since the 2015 ruling in Obergefell v. Hodges, which established a constitutional right to same-sex marriage.

This isn’t simply Schadenfreude. The fact that this momentous ruling was written by a right-wing judge sends a message that progress on L.G.B.T. rights will be very hard to reverse.

Had Clinton, like Trump, been able to put two justices on the court, the ultimate decision in this case would likely have been much the same, perhaps with a different legal rationale. But social conservatives would have been animated by outraged opposition, sure that winning the next election was key to re-establishing power. Now they’re demoralized.

The Trump administration will continue to try to roll back gay and transgender rights. Just last Friday, it finalized a regulation saying that the Affordable Care Act’s ban on sex discrimination in medical care doesn’t apply to trans people, using an argument similar to the one the Supreme Court rejected on Monday. Trump judges on lower courts can be expected to rule in favor of religious conservatives.

But these will be rear-guard actions. “The Roe v. Wade of religious liberty is here, and it was delivered by golden boy Neil Gorsuch,” lamented conservative lawyer Josh Hammer.

Legal experts who watched the arguments unfold weren’t entirely shocked that Gorsuch ruled as he did. The justice is well known as a textualist, someone who holds that the meaning of a law turns on the text alone, not the intentions of its drafters.

“What I saw in the argument was Gorsuch really struggling with the fact that the textual argument seemed really powerful to him,” Samuel Bagenstos, a University of Michigan law professor, told me. “There’s no way to think about sexual orientation discrimination without sex being part of it.”

Bagenstos was more surprised that Roberts — who, after all, wrote a dissent in Obergefell — joined the majority. Roberts may have simply been persuaded by the merits of the case, but Bagenstos suspects he was responsive to the political climate as well.

“This is going to be a very popular decision,” Bagenstos said. “It is something that the American people will largely agree with. And you never go wrong predicting that the Supreme Court is going to follow the election returns.”

None of this means that progressives can rest easy about this court. We’re awaiting important decisions on DACA, which could put hundreds of thousands of Dreamers in danger of deportation, and on June Medical Services v. Russo, which could end up eliminating abortion access in many states.

But on Monday, Gorsuch delivered a blow to the religious right that a court full of Clinton appointees could never have managed. Even the darkest timeline has its consolations.

The Times is committed to publishing a diversity of letters to the editor. We’d like to hear what you think about this or any of our articles. Here are some tips. And here’s our email: [email protected].

Follow The New York Times Opinion section on Facebook, Twitter (@NYTopinion) and Instagram.