A federal judge has put President Donald Trump’s ban on transgender people openly serving in the military, including the prohibition on the military paying for gender-affirming medical services, on hold.

US District Judge Marvin Garbis’s decision on Tuesday, reported by the Washington Post, argued that trans service members who challenged the ban have “demonstrated that they are already suffering harmful consequences such as the cancellation and postponements of surgeries, the stigma of being set apart as inherently unfit, facing the prospect of discharge and inability to commission as an officer, the inability to move forward with long-term medical plans, and the threat to their prospects of obtaining long-term assignments.”

Garbis’s preliminary injunction goes further than a previous decision by a federal court in Washington, DC. That decision blocked the portions of Trump’s ban that would have prohibited new trans recruits into the military and potentially forced the military to discharge existing trans service members. Garbis’s order, which comes from Maryland, additionally blocks Trump’s order banning the military from paying for gender-affirming medical services, particularly surgeries.

President Barack Obama previously moved to undo the military’s ban on openly serving trans troops. But in July, Trump tweeted that he would reinstate the ban on trans military service. He argued, “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.”

Then in August, the White House put out the actual policy behind those tweets. According to the administration, Trump would effectively return to the pre-2016 era in which trans troops could not serve openly. The policy also banned the military from paying for gender-affirming surgery, with some exceptions to “protect the health” of someone who had already begun transitioning.

But the guidance also allowed the secretary of defense, after consulting with the secretary of homeland security, some wiggle room to decide what to do with already serving trans service members — and it let them advise the president on reversing the ban. For now, an interim guidance by the secretary of defense allows the Pentagon to pay for trans service members’ procedures through a waiver — a process that recently let at least one trans service member go through a gender-affirming surgery.

The research, based on the experiences of other countries, shows that the costs associated with trans service members are actually very small. A 2016 review of the evidence by the RAND Corporation found that by allowing trans-inclusive medical care, “active-component health care costs would increase by between $2.4 million and $8.4 million annually, representing a 0.04 to 0.13 percent increase in active-component health care expenditures” — a very small amount.

This small cost may not mean much in budget terms, but it could mean a lot to trans soldiers: As the American Medical Association and American Psychiatric Association point out, transitioning helps reduce gender dysphoria — a state of emotional distress caused by how someone’s body or the gender they were assigned at birth conflicts with their gender identity. Untreated gender dysphoria, which not all trans people suffer from in the same way, can lead to anxiety, depression, and even suicide, so treating it could mean fewer mental health issues for trans people serving in the military.

Trump’s ban was to fully take effect in March 2018. With the two federal orders, the chances of that happening are now diminished — although the federal government is likely to appeal the decisions.

For more on Trump’s ban on trans troops, read Vox’s explainer.