The military must begin accepting transgender recruits Jan. 1 despite a ban ordered by President Trump this year, according to a D.C. district court judge.

Judge Colleen Kollar-Kotelly had already granted a preliminary injunction in the Doe v. Trump lawsuit filed by a group of transgender troops. She clarified this week that her order also blocks Defense Secretary Jim Mattis from delaying the recruiting.

Mattis had planned to begin accepting transgender recruits on the first of the year before Trump tweeted in July that they would not be allowed to serve in the military in any capacity. The president later followed up with an order telling the Pentagon to abandon the plan, which got underway during the previous administration.

“Secretary Mattis is a defendant in this case, he is directly bound by the injunction and he cannot change the policy that existed before President Trump issued his order,” the judge said.

The Trump administration is appealing the order but did not say whether it may seek a stay blocking the recruiting portion of the order.

“We disagree with the Court's ruling and are currently evaluating the next steps,” Lauren Ehrsam, a Justice Department spokeswoman, wrote in an email to the Washington Examiner.

The DOJ is arguing that the lawsuit, which is one of four federal suits against Trump for his ordered ban, is premature because Mattis and the Defense Department have not settled on a final policy for transgender troops.

Trump set a March deadline for the department to eliminate gender reassignment surgeries and decide how to handle transgender troops currently serving.

The president wrote in a series of July tweets that allowing transgender service members is too costly. His August order said the previous administration had failed to prove it would not hurt the military’s ability to fight.

Kollar-Kotelly’s injunction blocks the administration from moving ahead while the case is being heard and is an indication the court believes plaintiffs could ultimately prevail.

She cited Mattis’ June 30 decision to begin recruiting in her clarification Monday, making clear it cannot be delayed even if the Pentagon argues it needs more time to study the issue.

“Those policies allowed for the accession of transgender individuals into the military beginning on January 1, 2018,” she wrote. “Any action by any of the defendants that changes this status quo is preliminarily enjoined.”