Transgender service members won a major victory on Monday, not just in the fight to keep their jobs but in the cultural battle for public respect.

On Monday afternoon, U.S. District Judge Colleen Kollar-Kotelly granted a preliminary injunction against a critical portion of President Trump’s hastily tweeted transgender troop ban, writing that the plaintiffs in the lawsuit against the new policy are “likely to succeed in this lawsuit under the Fifth Amendment,” which guarantees equal protection of the law.

As the Associated Press first reported, Kollar-Kotelly’s order blocks the Trump administration’s planned reversal of a 2016 policy allowing transgender troops to serve openly. Trump had tweeted about his intention to reverse the Obama-era policy in July and ordered the Pentagon to comply in August, giving rise to an immediate lawsuit from the National Center for Lesbian Rights (NCLR) and GLBTQ Legal Advocates and Defenders (GLAD).

“This is a complete victory for our plaintiffs and all transgender service members, who are now once again able to serve on equal terms and without the threat of being discharged,” said Shannon Minter, NCLR’s legal director, in a statement to the press.

But the language and legal reasoning in Kollar-Kotelly’s 76-page opinion is a victory in and of itself—comparable in some moments to the moving words of the Supreme Court’s majority decision in Obergefell v. Hodges to legalize same-sex marriage.

“Plaintiffs are current and aspiring service members who are transgender,” Kollar-Katelyn wrote, before proceeding to praise their service. “Many have years of experience in the military. Some have decades. They have been deployed on active duty in Iraq and Afghanistan. They have and continue to serve with distinction.”

Later in her opinion, Kollar-Kotelly notes that transgender people are a “discernible class,” which makes it necessary to apply “a heightened degree of scrutiny” to Trump’s transgender troop ban.

“As a class, transgender individuals have suffered, and continue to suffer, severe persecution and discrimination,” she acknowledged, adding: “Despite this discrimination, the court is aware of no argument or evidence suggesting that being transgender in any way limits one’s ability to contribute to society. The exemplary military service of plaintiffs in this case certainly suggests that it does not.”

Her words on the ban itself are withering, calling the Trump administration’s cited reasons for the decision—military effectiveness and cost—“hypothetical and extremely overbroad.”

The costs, she noted, have “been found to be minimal or negligible” and are “primarily related to a surgical procedure that only a subset of transgender individuals will even need.”

Indeed, as The Washington Post and several other outlets reported, the military spends about five times as much on Viagra as it would on transition-related health care for the estimated 4,000 currently-serving transgender troops.

But the judge reserved her harshest words for the way in which Trump announced the ban: on Twitter, in the morning, taking top military officials by surprise.

“[T]he president abruptly announced, via Twitter—without any of the formality or deliberative process that generally accompany the development and announcement of major policy changes that will gravely affect the lives of many Americans—that all transgender individuals would be precluded from participating in the military in any capacity,” Kollar-Kotelly wrote, noting that this chain of events “provide[s] additional support” for the plaintiffs’ claim that the announcement was “not driven by genuine concerns regarding military efficacy.”

As was the case with Trump’s travel ban, then, Trump’s own tweets came back to bite him. If he had implemented a transgender troop ban more methodically, after internal studies, Kollar-Kotelly acknowledges that “this would be a different case.” But as is, Kollar-Kotelly notes, the data doesn’t support the ban and it is “highly suggestive of a constitutional violation.”

Her description of the six plaintiffs in the case—all of them transgender service members—are also deeply humanizing, highlighting their struggles to receive health care, to come out to their commanding officers, and to cope with the potential consequences of the troop ban.

For example, with regards to “John Doe 1,” a transgender man using a pseudonym, the judge highlights his family tradition of military service: “His great grandfather served in Europe in World War II. His father served in the Air Force and was awarded the Bronze Star for valor. His uncle was a United States Marine who was wounded and paralyzed by an improvised explosive during Operation Desert Storm. His aunt served in the military as well. John Doe 1 has idolized military service since childhood.”

On a press call, Blake Dremann, director of Servicemembers, Partners, Allies for Respect and Tolerance for All (SPART*A), called the decision “a big boost of encouragement for our service members,” noting that it “solidifies the fact that we are continuing to serve with honor, with no impact to unit cohesion, military readiness, or the lethality of the force.”

Kollar-Kotelly did dismiss some claims pertaining to military payment for sex-reassignment surgery based on the fact that none of the six individual plaintiffs “have demonstrated that they are substantially likely to be impacted” by the proposed ban on sex-reassignment surgery specifically. As NCLR and GLAD legal advocates pointed out on a press call, the judge’s order effectively restores an environment in which the military is expected to provide medically necessary health care. Most major medical associations recognize transition-related health care as medically necessary.

This preliminary injunction is not likely to be the end of the legal battle over transgender troops—or access to surgical care for transgender people more generally.

But although Kollar-Kotelly’s injunction is not permanent and little of her legal reasoning is brand new—there is legal precedent to consider discrimination against transgender people as sex discrimination, for example—the opinion is nonetheless momentum to the judicial advocacy for transgender rights. In particular, advocates say, her decision to apply “heightened” scrutiny to review the action should give hope to transgender plaintiffs in this and other cases.

“It’s not the first court to do so; the court itself recognized the other federal district courts that have done so,” Jennifer Levi, director of GLAD’s Transgender Rights Project, acknowledged, but called it “an extraordinarily important decision” nonetheless.

Indeed—at this juncture, at least—the Trump administration’s attack on transgender troops appears to be backfiring spectacularly. Trump tried to tweet them out of the armed forces; in response, they brought about the conditions for one of the most masterfully written defenses of transgender humanity in legal history.