A U.S. judge in Seattle has ordered President Donald Trump not to ban transgender troops from serving in the military, saying it’s unclear whether recent changes to his administration’s policy are constitutional.

U.S. District Judge Marsha Pechman was one of four judges nationwide who blocked Trump late last year from overturning an Obama-era directive allowing transgender troops to serve openly. The Justice Department asked her to dissolve that ruling, citing changes that would allow transgender troops to serve in limited cases.

Because the changes were announced just last month, the sides had not had time to argue whether the policy is discriminatory or whether the military is entitled to set its own policy, given its expertise in what’s needed for national defense, Pechman said in an order Friday. She told the parties to prepare for trial.

“Because transgender people have long been subjected to systemic oppression and forced to live in silence, they are a protected class,” Pechman wrote. “Therefore, any attempt to exclude them from military service will be looked at with the highest level of care.”

The Morning Rundown Let our news meet your inbox. The news and stories that matters, delivered weekday mornings. This site is protected by recaptcha

She also said the government must show that the ban “was sincerely motivated by compelling interests, rather than by prejudice or stereotype, and that it is narrowly tailored to achieve those interests.”

The Pentagon lifted its longstanding ban on transgender troops in 2016. Trump took defense leaders by surprise last July, when he tweeted that the U.S. government would not allow transgender members to serve.

It triggered a number of lawsuits, and federal judges in Seattle; Baltimore; Washington, D.C.; and Riverside, California, blocked Trump from rescinding former President Barack Obama’s policy. The Pentagon began allowing transgender people to serve and enlist on Jan. 1.

Defense Secretary Jim Mattis also launched a review on the issue, forwarding recommendations to Trump in February. Trump issued a memo March 23 giving the Pentagon the go-ahead to implement a policy that would block transgender people from serving in many cases.

Transgender people who have been diagnosed with gender dysphoria or have a history of the condition would be banned, with some exceptions. Those who can show they have been stable for 36 months would be allowed to serve if they adhere to the standards for their “biological sex.”

Anyone who has transitioned or who needs medical treatment to do so would be presumed ineligible for service, though they could seek individual waivers allowing them to serve.

Under Pechman’s ruling, that policy can’t take effect. She said the changes didn’t truly amount to a new policy but “instead threaten the very same violations” that led her and other judges to block the ban.

Her ruling came in a challenge brought by several transgender troops or prospective troops, as well as civil rights organizations including Lambda Legal. The state of Washington is also a plaintiff.

“The court’s ruling means President Trump’s hastily conceived and discriminatory ban now has to stand up to the court’s most rigorous standard of review,” Attorney General Bob Ferguson said in a statement Sunday night. “I am confident the ban will not withstand that.”

FOLLOW NBC OUT ON TWITTER, FACEBOOK AND INSTAGRAM