The US military must allow openly serving transgender recruits starting on January 1, a federal judge ruled on Monday.

The ruling clarifies a previous injunction issued in October by US District Judge Colleen Kollar-Kotelly in Washington, DC.

President Donald Trump’s administration is already appealing the October decision. But it also asked the court to clarify whether Defense Secretary James Mattis has the discretion, under her ruling, to delay the start date for recruitment of openly trans soldiers. Kollar-Kotelly responded that no, he does not, and the military must start taking trans recruits on January 1.

The clarification follows yet another federal ruling that declared that the military must also pay for trans-inclusive medical services, including gender-affirming surgeries.

President Barack Obama previously moved to undo the military’s ban on openly serving trans troops, with the policy change set to take effect over the summer. 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 released 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 recent court rulings, the chances of that happening are now diminished — although the courts could overturn the latest decisions on appeal.

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