Even by Trumpian standards, the transgender troop ban has been a colossal failure.

Ever since July 2017, when Trump acceded to the religious right and tweeted a ban on transgender military service without consulting military leaders first, the administration has been dealt blow after blow, suffering two major defeats in the past week alone.

“ Because transgender people have long been subjected to systemic oppression and forced to live in silence, they are a protected class. ”

On April 13, a district court in Washington State reaffirmed its prior injunction on Trump’s transgender troop ban, writing that it “specifically targets one of the most vulnerable groups in our society, and must satisfy strict scrutiny if it is to survive.”

“Because transgender people have long been subjected to systemic oppression and forced to live in silence, they are a protected class,” U.S. District Judge Marsha Pechman added in her ruling.

On April 18, District Judge Colleen Kollar-Kotelly—who had previously issued one of the four injunctions against the transgender troop ban last year—denied the Trump administration’s motion for a protective order in one of the ongoing legal challenges, ruling that discovery in the case would continue. The Trump administration now has a May 15 deadline to turn over “responsive, non-privileged documents” related to the ban.

Last year, Time predicted that the ban “may backfire politically.” By now, it already has.

Not only will LGBT advocates win the war over transgender military service; they will come away from it with a pile of legal rulings in their favor and more Republican allies on the issue than ever.

Indeed, by trying to hurt the transgender rights movement at a crucial and vulnerable moment, the Trump administration will only help speed it along.

It’s important to remember that the political discourse around transgender people was literally in the toilet before Trump tried to ban transgender military service.

Restroom use was the transgender controversy of 2016 and early 2017—and public opinion was actually fairly divided on the bathroom question, with some polls like Gallup’s, showing narrow support for requiring transgender people to use restrooms according to their assigned gender at birth and others, like Pew’s, showing narrow support for allowing transgender people to use restrooms matching their gender.

Fast forward to 2018 and not only are anti-transgender “bathroom bills” failing, but thanks to Trump, the battlefield has displaced the bathroom as the trans topic du jour.

Public opinion on transgender military service is not nearly as divided as it is on the bathroom question. The latest Economist/YouGov poll—published in March 2018—shows that only 34 percent of Americans oppose transgender military service, while 49 percent support it.

Broken down by strength of sentiment, only 23 percent say they “strongly” oppose transgender military service as compared to 31 percent who are “strongly” in favor.

Banning transgender troops, YouGov concluded, “isn’t a change most Americans support,” although “partisan division on the question” remains.

“ There is no reason to force service members who are able to fight, train, and deploy to leave the military—regardless of their gender identity. ”

But even though the Republican electorate might largely oppose transgender military service, several GOP senators have made supportive statements—statements that it’s hard to imagine they would have made otherwise unless the White House had made this an issue.

“There is no reason to force service members who are able to fight, train, and deploy to leave the military—regardless of their gender identity,” Sen. John McCain said in a statement last July.

Sen. Joni Ernst said in an interview this March that she would “gladly” accept any transgender people into the military who “meet physical requirements” for service, as the Washington Blade reported.

One of the most perfectly succinct Republican statements came from Utah Sen. Orrin Hatch who said last July, “Transgender people are people, and deserve the best we can do for them.”

It’s hard to imagine a scenario in which a gaggle of Republican senators—including Susan Collins and Richard Shelby—would start issuing statements about how “transgender people are people” apropos of nothing: Why go out of your way to anger more dogmatically anti-LGBT constituents if they don’t have to be angered?

But by taking such an extreme and unpopular stance, the Trump administration essentially forced their hand—and now Orrin Hatch is on record saying that he doesn’t “think we should be discriminating against anyone,” transgender people included.

“ The moderates have stepped up way sooner than they would have. Had this ban not have happened, I think we would still be working on them. ”

As vocal transgender Republican Jennifer Williams recently told The Daily Beast, “The moderates have stepped up way sooner than they would have. Had this ban not have happened, I think we would still be working on them.”

But perhaps more consequential than either the public support for transgender military service or the statements from senators—at least in the long term—are the court rulings coming out of this whole fiasco.

Trump’s original 2017 version of the transgender troop ban was halted by not one, not two, but four injunctions, effectively allowing transgender recruits to begin signing up as of Jan. 1 of this year.

Those injunctions were damning. Judge Kollar-Kotelly wrote in hers last October that transgender people are a “discernible class” who “have suffered, and continue to suffer, severe persecution and discrimination” but display “exemplary military service” regardless.

In March 2018, the administration tried again with a “new policy” implementing the transgender troop ban but this past week’s ruling by U.S. District Judge Marsha Pechman made it clear that it was just the old ban with a new coat of paint.

“Defendants claim that the 2018 Memorandum and the Implementation Plan differ from the 2017 Memorandum in that they do not mandate a ‘categorical’ prohibition on service by openly transgender people and ‘contain several exceptions allowing some transgender individuals to serve,’” the ruling read, adding perfunctorily: “The Court is not persuaded.”

Indeed, the Trump administration’s motivations for implementing the ban are so transparently discriminatory—and so clearly not about “military readiness,” given the findings of the oft-cited RAND study on the subject—that courts are seeing straight through them.

“ If history is any prediction of the future, the ban is still doomed at its next reckoning. ”

That has given a much-needed shot of confidence to the LGBT rights groups fighting the ban. As of this week, Lambda Legal and OutServe-SLDN’s joint lawsuit is headed to a trial and they seem extraordinarily certain of an eventual victory.

“If history is any prediction of the future, the ban is still doomed at its next reckoning,” Lambda Legal attorney Peter Renn said in a press release.

Analyzing the legal road ahead for the transgender troop ban this March, Slate writer Mark Joseph Stern predicted, “If the Trump administration wants this policy to take effect, it will have to ask permission from the U.S. Supreme Court,” adding that, at that point, the justices would have to be willing to “abruptly [scrap] a policy that has run smoothly for almost two years.”

In the meantime, the various rulings against the ban will pay dividends elsewhere in the transgender rights movement. In particular, Judge Marsha Pechman’s determination in particular that transgender people are a “protected class”—language that Lambda Legal called a “legal gem”—is like icing on the cake for LGBT advocates who want to see transgender people protected in all areas of public life, not just the military.

As the National Center for Transgender Equality notes, LGBT legal groups have argued successfully in several high-profile cases that discrimination against transgender people is discrimination on the basis of sex—and therefore a violation of Title VII and Title IX. That’s why the Equal Employment Opportunity Commission currently “interprets and enforces Title VII’s prohibition of sex discrimination as forbidding any employment discrimination based on gender identity,” according to their website.

Court rulings that determine that transgender people specifically constitute a “suspect class” or a “protected class” are basically gifts from above to LGBT advocates who not only want more rulings to cite in legal challenges to the troop ban, but in challenges to anti-transgender policies and practices everywhere else, too.

Language like “protected class” coming out of a federal court is just one more tool in a well-appointed toolbox that already contains Titles VII and IX.

Indeed, the April 13 district court ruling affirmed that there is a “long and well-recognized” history of anti-transgender discrimination in the United States in the fields of “employment, housing, criminal justice, and access to health care.”

By going after transgender troops so sloppily, Trump has not only failed to keep them out of the military, he has also given LGBT advocates more leverage to combat anti-transgender discrimination in all of these arenas as well.

The Trump administration wanted to kick transgender people while they were down, and ended up making them stronger than ever.