A federal judge in Washington blocked the Trump Administration’s proposed transgender military ban, writing in a strongly worded opinion that the policy “does not appear to be supported by any facts.”

U.S. District Judge Colleen Kollar-Kotelly issued the preliminary injunction Monday, finding that a group of transgender service members would have a strong chance of prevailing in their lawsuit to have the ban declared unconstitutional. The injunction remains in place until the lawsuit is resolved or a judge lifts it.

The move is another legal setback for the president, who surprised military leaders and members of Congress when he announced the proposal via a series of tweets in late July that reversed an Obama administration policy allowing transgender service members to serve openly and begin enlisting in January.

The tweets were followed by a presidential directive and a plan set to take effect in March that would have blocked military recruitment of transgender people and would have forced the dismissal of current transgender service members.

The judge’s injunction effectively reverts Trump’s policy to the one issued under Obama.

After completing Plebe Summer training in August 2015, Regan Kibby, right, hugs his younger sister Elena Kibby. Regan Kibby is a plaintiff in the federal lawsuit over the proposed transgender military ban. (Tawnia Kibby)

The Obama administration announced its policy after a Pentagon review found no basis to exclude transgender people from the military after it examined medical care, military readiness and other factors.

The Monday ruling was hailed by GLBTQ Legal Advocates and Defenders (GLAD) and the National Center for Lesbian Rights (NCLR), who sued in August on behalf of six active-duty transgender service members who had come out to their superiors and had roughly 60 years combined in the military. It was the first of a handful of suits to challenge the ban and the first significant ruling by a judge on Trump's policy.

“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 NCLR Legal Director Shannon Minter.

Department of Justice spokeswoman Lauren Ehrsam issued a statement, saying the department is “currently evaluating the next steps.” Department attorneys had previously asked for the suit to be dismissed.

“Plaintiffs’ lawsuit challenging military service requirements is premature for many reasons, including that the Defense Department is actively reviewing such service requirements, as the President ordered, and because none of the Plaintiffs have established that they will be impacted by current policies on military service,” the statement read.

The six service members in the lawsuit contended that their Fifth Amendment rights to equal protection were being violated — a claim bolstered by three former Obama administration service branch chiefs and a senior Pentagon official, who offered statements saying the ban would harm readiness, staffing, recruitment and morale.

How Trump is rolling back Obama’s legacy

Kollar-Kotelly was unsparing in her ruling, saying the hastily announced Trump policy did not pass muster on many fronts.

“There is absolutely no support for the claim that the ongoing service of transgender people would have any negative effect on the military at all. In fact, there is considerable evidence that it is the discharge and banning of such individuals that would have such effects,” Kollar-Kotelly wrote.

Carl Tobias, a professor at the University of Richmond School of Law, said the Trump administration would likely have to go all the way to the Supreme Court to have any chance of getting the preliminary injunction nullified.

“If they go to the D.C. Circuit, I can’t imagine they are going to overturn this,” Tobias said. “The judge was strong in her opinion. She just didn’t see any support for the policy on the facts.”

More than a dozen states filed a brief in October supporting the arguments of the service members in the case, writing that Trump was pursuing an “irrational” return to discrimination in the military.

One aspect of the opinion that continued to be debated Monday was the barring of military funding for sex-reassignment surgery, which is part of the ban.

Kollar-Kotelly’s order found that none of the plaintiffs had shown they were likely to be affected by that funding ban, so the court was not in a position to rule on “the propriety of this directive.”

Transgender advocates, however, insisted that the ruling allowed the military to continue to pay for such surgeries. The Department of Justice declined to comment on its understanding of the ruling as it relates to the surgery issue.

There is no official tally of transgender military members, and estimates vary widely. One recent study by the Rand Corp. put the number on active duty at about 2,500, while another from the Williams Institute at UCLA School of Law estimated that there were 15,500 on active duty, in the National Guard and in the reserves. Currently, 18 other countries allow transgender troops to serve in the military,

Trump’s proposal was cheered by many religious conservatives but outraged transgender advocates and many liberals. Trump blindsided many when he announced the policy on Twitter.

“After consultation with my Generals and military experts, please be advised that the United States Government will not accept or allow Transgender individuals to serve in any capacity in the U.S. Military,” Trump wrote in the tweets. “Our military must be focused on decisive and overwhelming victory and cannot be burdened with the tremendous medical costs and disruption that transgender in the military would entail.”

Lesbian, gay and transgender advocates say the ban is part of a broader pattern of discrimination by the Trump administration. This month, Attorney General Jeff Sessions reversed a Justice Department policy protecting transgender workers from discrimination under federal law.