Gorsuch?

If the first shock Monday morning was that the conservative Supreme Court had delivered a landmark victory to gay and transgender workers, the second was the opinion’s author: President Trump’s first nominee for the high court, Neil M. Gorsuch.

In his 38 months on the court, Gorsuch has shown himself to be one of its most conservative members, more comfortable on the right edge with Justice Clarence Thomas than toward the middle with Chief Justice John G. Roberts Jr.

He’s been known more for his dissents than his majority opinions, and it is not usually the case that the most junior member of the majority take the lead in writing what will be one of the most famous cases of the term.

But those who saw oral arguments in the cases now collectively known as Bostock v. Clayton County knew that Gorsuch seemed key.

Stanford law professor Pamela S. Karlan and ACLU Legal Director David Cole, representing, respectively, the gay workers and transgender plaintiff Aimee Stephens, passed up an appeal to fairness or equality in favor of arguing that the broad text of Title VII of the 1964 Civil Rights Act already protected their clients.

At argument, Gorsuch seemed to accept the view. “Assume for the moment I’m with you on the textual evidence. It’s close, okay?” Gorsuch said to Cole.

But at the end of the day, he asked, should a judge “take into consideration the massive social upheaval that would be entailed in such a decision, and the possibility that — that Congress didn’t think about it.”

Cole replied: “It’s not asking you to address a policy question that would be more appropriate to Congress but asking you to interpret the statute as it is written.”

Left unsaid was that Gorsuch himself had counseled just such an approach in a book he published last summer, “A Republic, If You Can Keep It.” In it, he made an extensive case for “textualism,” meaning that the words of the statute in question take prominence, not the intentions of legislators or the consequences of the judicial decision.

“The text of the statute and only the text becomes law,” Gorsuch wrote in the book. “Not a legislator’s unexpressed intentions, not nuggets buried in the legislative history, and certainly not a judge’s policy preferences.”

In Monday’s ruling, Gorsuch joined the court’s four liberals — Justices Ruth Bader Ginsburg, Stephen G. Breyer, Sonia Sotomayor and Elena Kagan — as well as Roberts, who had not shown his hand at oral argument and had been in dissent five years ago when the court held that the Constitution protected a right for same-sex couples to marry.

But at oral argument in that case, Obergefell v. Hodges, Roberts suggested the outcome might be different in a case of statutory interpretation. “If Sue loves Joe and Tom loves Joe, Sue can marry him and Tom can’t,” Roberts told one of the lawyers. “And the difference is based upon their different sex. Why isn’t that a straightforward question of sexual discrimination?”

That was basically the opinion that Gorsuch wrote in Bostock, and Roberts joined.

“It is impossible to discriminate against a person for being homosexual or transgender without discriminating against that individual based on sex,” Gorsuch wrote. An example: If an employer “fires the male employee for no reason other than the fact he is attracted to men, the employer discriminates against him for traits or actions it tolerates in his female colleague.”

Gorsuch acknowledged that members of Congress in 1964 were not intending to protect LGBTQ individuals, but what mattered, he said, is the law they wrote.

“Only the written word is the law, and all persons are entitled to its benefit.”

That result was just what some conservatives had feared since the October arguments in the cases. The Wall Street Journal’s conservative editorial board warned Gorsuch and Roberts last fall that they were being hoodwinked and on the verge of misusing textualism.

Earlier this year, conservative columnist Josh Hammer tweeted: “There is a rumor rapidly circulating in legal conservative circles that Gorsuch is going to side with the liberals and read transgenderism into Title VII. I’m a longtime Gorsuch skeptic, but this would certainly be an unprecedented betrayal. Let’s hope it’s not true.”

The decision separated Gorsuch from two justices with whom he often sides — Thomas and Samuel A. Alito Jr. — and from fellow Trump nominee Brett M. Kavanaugh.

“Obviously, there will be some close cases,” Gorsuch wrote in his book. “And in those close cases we can expect that lawyers and judges of good faith will debate vigorously what the traditional tools of statutory interpretation suggest about a particular text’s meaning.”

In his dissent that was joined by Thomas, Alito called Gorsuch’s interpretation “preposterous.”

“A more brazen abuse of our authority to interpret statutes is hard to recall,” he added.

Justice Antonin Scalia, the modern justice most conservative members of the court seem to strive to emulate, was an advocate of textualism, and his views were cited by Gorsuch. Alito told him not to claim Scalia’s mantle.

“The court’s opinion is like a pirate ship,” Alito wrote. “It sails under a textualist flag, but what it actually represents is a theory of statutory interpretation that Justice Scalia excoriated — the theory that courts should ‘update’ old statutes so that they better reflect the current values of society.”

Kavanaugh was less vitriolic, but said Gorsuch had misused textualism.

“There is no serious debate about the foundational interpretive principle that courts adhere to ordinary meaning, not literal meaning, when interpreting statutes,” wrote Kavanaugh, who often disagrees with Gorsuch. “As Justice Scalia explained, ‘the good textualist is not a literalist.’ ”

Immediate reactions to major Supreme Court decisions are often outsized, then revised when the next set of opinions lands.

Republican Sen. Josh Hawley of Missouri, a former Roberts clerk, said Tuesday that the decision “represents the end of the conservative legal movement.” Harvard law professor Noah Feldman wrote in a Bloomberg opinion piece that the landmark ruling “will mean liberals must treat Gorsuch as a serious justice, not just a Trump minion.”

This was just the beginning of the court’s major decisions of the term: the fate of the Deferred Action for Childhood Arrivals program, restrictions on abortion, religious liberty cases, and President Trump’s legal battle to keep his financial records from Congress and prosecutors await.

The court’s next decisions will be released Thursday.