A federal judge on Monday barred President Donald Trump's administration from proceeding with plans to exclude transgender people from military service.

U.S. District Judge Colleen Kollar-Kotelly ruled that the transgender service members who had sued over Trump's policy were likely to win their lawsuit. She directed a return to the situation that existed before Trump announced his new policy this summer, saying the administration had provided no solid evidence for why a ban should be implemented.

Trump had ordered a reinstatement of the longstanding policy that barred transgender individuals from joining the military; service members who were revealed to be transgender were subject to discharge. Under President Barack Obama, that policy was changed last year to allow transgender people to serve openly.

The Trump administration may appeal Kollar-Kotelly's decision, but for now, the proposed ban remains unenforceable under Kollar-Kotelly's preliminary injunction.

"We disagree with the court's ruling and are currently evaluating the next steps," said Justice Department spokesman Lauren Ehrsam.

She reiterated the department's view that the lawsuit was premature because the Pentagon was still in the process of reviewing how the transgender policy might evolve.

One of the attorneys handling the lawsuit, Shannon Minter of the National Center for Lesbian Rights, said the ruling was an enormous relief to his clients.

"Their lives have been devastated since Trump first tweeted he was reinstating the ban," Minter said. "They are now able to serve on equal terms with everyone else."

Trump announced on Twitter in July that the government "will not accept or allow transgender individuals to serve in any capacity in the U.S. Military." He followed with an August memo directing the Pentagon to extend indefinitely a ban on transgender individuals joining the military, and gave Defense Secretary Jim Mattis six months to come up with a policy on "how to address" those who are currently serving.

Under the Obama administration, the Department of Defense had announced in 2016 that service members could not be discharged solely based on their gender identity. Transgender individuals were to be allowed to enlist in the military in June 2017, a timeline initially delayed under the Trump administration to Jan. 1, 2018.

Minter said the new court ruling means they will be able to enlist as of that date.

The Trump administration had asked the court to dismiss the lawsuit; Kollar-Kotelly refused to do so, and Minter said it's possible the case will go to trial.

One issue not directly addressed in Monday's ruling was whether federal funds should be used to pay for sexual reassignment surgeries for members of the military. The administration has sought to prohibit such payments; Kollar-Kotelly said she didn't have jurisdiction to rule on the issue because none of the plaintiffs in the case established a likelihood of being impacted by that prohibition.

The lawsuit was filed in August by the National Center for Lesbian Rights and GLBTQ Legal Advocates & Defenders (GLAD) on behalf of eight transgender individuals, including service members in the Air Force, Coast Guard and the Army, as well as students at the U.S. Naval Academy and in the ROTC program at the University of New Haven.

The Justice Department, in seeking the lawsuit's dismissal, said none of the plaintiffs had established that they will be impacted by current policies on military service.

The two advocacy groups who filed the lawsuit assailed that assertion. They highlighted the uncertainty facing Regan Kibby, the transgender Naval Academy student who -- because of Trump's action -- was unsure whether he would be able to join the Navy on graduation.

Kollar-Kotelly said the plaintiffs clearly established that they would be harmed by the administration's directives. She also contended that the plaintiffs were likely to prevail in arguing that the directives were unconstitutionally discriminatory -- targeting transgender people without evidence that their service caused substantive problems for the military.

The directives "do not appear to be supported by any facts," the judge wrote.

Other lawsuits challenging president's directive have been filed in Seattle and Baltimore.

Oral arguments are scheduled Nov. 9 for the Baltimore lawsuit, which was filed by the American Civil Liberties Union on behalf of six transgender service members.

"The federal courts are recognizing what everyone already knows to be true: President Trump's impulsive decision to ban on transgender people from serving in the military service was blatantly unconstitutional," said Joshua Block, senior staff attorney with the ACLU's LGBT & HIV Project.

The Pentagon has not released data on the number of transgender people currently serving, but a Rand Corp. study has estimated between 1,320 and 6,630, out of 1.3 million active-duty troops.