On Monday, supporters of LGBT rights declared that there had been a “victory for justice.” A court rejected President Trump’s ban on transgender people serving in the military, essentially reinstating a previous policy that allowed them to serve.

“Transgender people are just as qualified to serve as anyone else,” GLAD’s Jennifer Levi, a lead co-counsel in case, tells TIME. The decision by the U.S. District Court for the District of Columbia means that people who are currently in the military cannot be discharged “just for being transgender,” she says. “And it means transgender people have to be allowed to enlist in the military.”

The government could decide to appeal the preliminary injunction issued by the court, which prohibits the military from enforcing the ban. “The ball is in the government’s court,” Levi says, adding that the ruling means “there’s no gray area” for now.

Before he left office, President Obama set in motion changes that would end a long-standing ban on the service of transgender troops. About five years after lifting the ban on the open service of gay and lesbian Americans, the Department of Defense announced in 2016 that transgender people could serve openly as well. Many transgender individuals came out, being open about identities they had long hidden for fear of being discharged, and the military started preparing to enlist openly transgender people.

After taking office, Trump moved to undo the changes Obama instigated, saying in a memo that allowing transgender people to serve could “disrupt unit cohesion” and “tax military resources.” Some Republicans have objected to taxpayer funds going toward transition-related medical care, such as gender reassignment surgery. And Trump suggested that additional study was required to make sure the implementation of the new policy would not have “negative effects.”

Many transgender troops who had made their identities public were meanwhile left wondering if they’d accidentally put their jobs at risk. The ban had “thrown their lives into chaos,” says Levi, who is representing several plaintiffs in the case, six of whom are currently serving in the military on active duty. “Rather than be able to count on a career in military service, as they have done, they’d be facing discharge.” Other plaintiffs are aspiring service members who feared Trump’s ban meant those plans had been “thrown out the window.”

Levi says that the ruling proves that sufficient study had been done before the ban was initially lifted in 2016. The decision had been reviewed for one year. During that time, the RAND Corporation issued a report finding that the number of openly transgender people serving in the military would likely “be a small fraction of the total force and have minimal impact on readiness and health care costs.” There is no definite figure for how many transgender people are currently on active duty, but estimates range from about 2,500 to 15,500.

In the opinion, U.S. District Judge Colleen Kollar-Kotelly stated that the government had not proven that national defense was at risk. “There is absolutely no support for the claim that the ongoing service of transgender people would have any negative effective on the military at all,” she wrote. “In fact, there is considerable evidence that it is the discharge and banning of such individuals that would have such effects.”

Get The Brief. Sign up to receive the top stories you need to know right now. Please enter a valid email address. Sign Up Now Check the box if you do not wish to receive promotional offers via email from TIME. You can unsubscribe at any time. By signing up you are agreeing to our Terms of Use and Privacy Policy . This site is protected by reCAPTCHA and the Google Privacy Policy and Terms of Service apply. Thank you! For your security, we've sent a confirmation email to the address you entered. Click the link to confirm your subscription and begin receiving our newsletters. If you don't get the confirmation within 10 minutes, please check your spam folder.

Write to Katy Steinmetz at katy.steinmetz@time.com.