Trump’s Day One executive order also directed changes in federal policies to ensure that “males are not detained in women’s prisons or housed in women’s detention centers.” The number of transgender women in federal women’s prisons make up a fraction of the population, with only about 16 nationwide, the Justice Department has said. Nearly all of the roughly 2,230 federal inmates who are transgender are housed in facilities matching their biological sex, the department has said in court papers.

In Tuesday’s ruling, the judge agreed with a claim by the Trump administration that allowing the president’s policies to take effect is an important part of “letting democratic processes play out.” But, he said, “democracy is not as simple as the defendants make it sound.”

“If democratic self-governance means anything, it means giving effect to all duly enacted laws, including those … that were enacted decades ago,” Lamberth wrote. He added: “it does not mean blind submission to the whims of the most recent election-victor.”