Transgender individuals will still be allowed to enlist in the military starting Jan. 1, a Pentagon official told the Associated Press Monday, despite President Donald Trump’s attempts to bar them from the armed services.

Trump first tweeted that he wanted to ban trans Americans from serving in the military in July. But that wide-reaching order, written in just three tweets, apparently came as a surprise to the Pentagon, which had announced in 2016 that it would allow openly trans troops to join and serve in the military. The plan had originally called for the military to start allowing them to begin enlisting in July 1, 2017, but in June, Trump’s defense secretary, James Mattis, delayed that deadline until Jan. 1, 2018.

Trump’s tweets led the White House to release guidelines in August halting those plans to allow the Pentagon to “reassess” the deployability of trans service members. But five active-duty transgender service members, with the help of the National Center for Lesbian Rights and GLAAD, sued to stop him. A federal district court judge has since ruled twice in their favor.

The judge ordered the military to “revert to the status quo” and accept trans service members in 2018. And U.S. Army Maj. David Eastburn, a spokesperson for the Defense Department, confirmed that the military would comply.

A study by the RAND Corporation estimates that between 1,320 and 6,630 trans people are currently in active service in the U.S. military.