Transgender recruits can soon begin applying to the US military after Donald Trump’s efforts to block them were struck down.

“The DoD is prepared to comply with the court order to access transgender applicants for military service 1 January,” a Department of Defence spokesperson said.

Earlier this year, Mr Trump announced his intention to block transgender people from openly serving, reversing Barack Obama’s move to lift a prohibition.

The change was immediately entangled in legal challenges and denounced by transgender soldiers, and some military officials who said it was needlessly discriminatory.

By announcing a major policy change on Twitter, Mr Trump even surprised some members of his own administration.

Softening the blow, Defence Secretary James Mattis said the Obama-era authorisation of transgender service would remain in place pending a review, meaning members could continue serving.

Two months later, a federal judge ruled against the ban, siding with current and aspiring transgender service members who sued to halt it.

In her ruling, Judge Colleen Kollar-Kotelly rejected arguments that allowing transgender people to enlist would undermine military effectiveness, echoing a study commissioned by the Obama administration that found that allowing transgender service members would have “minimal impact” on troop readiness.

Transgender in Pakistan Show all 16 1 /16 Transgender in Pakistan Transgender in Pakistan Dancing at Shakeela's party, an event to celebrate a transgender life in middle-age Reuters Transgender in Pakistan Venue staff members watch people dance at Shakeela's party in Peshawar, Pakistan Reuters Transgender in Pakistan Security searches guests as people arrive at Shakeela's party in Peshawar, Pakistan Reuters Transgender in Pakistan Members of the transgender community dance at Shakeela's party in Peshawar, Pakistan Reuters Transgender in Pakistan Shakeela, a member of the transgender community, works in the kitchen at home in Peshawar, Pakistan Reuters Transgender in Pakistan 'It's the first time a transgender party has been held openly,' says activist Farzana Jan Transgender in Pakistan Farzana Jan, a member of the transgender community, poses for a photographer ahead of Shakeela's party in Peshawar, Pakistan Reuters Transgender in Pakistan Guests at Shakeela's party Reuters Transgender in Pakistan Money thrown by the guests is used by people to help them start a new business or project Transgender in Pakistan Rani smiles from behind her make-up as she prepares for the party Reuters Transgender in Pakistan Shakeela resting at her home in Peshawar Reuters Transgender in Pakistan A photo hangs on the wall in the home of members of the transgender community in Peshawar, Pakistan Reuters Transgender in Pakistan Make up lies on the floor as members of the transgender community prepare for Shakeela's party in Peshawar, Pakistan Reuters Transgender in Pakistan A guest counts money she plans to throw at Shakeela's party Reuters Transgender in Pakistan Bubbly helps Shakeela with her dress as members of her own family watch on Reuters Transgender in Pakistan Chahat, a member of the transgender community, prepares for Shakeela's party in Peshawar, Pakistan Reuters

“There is absolutely no support for the claim that the ongoing service of transgender people would have any negative effective on the military at all,” Ms Colleen Kollar-Kotelly wrote.

“In fact, there is considerable evidence that it is the discharge and banning of such individuals that would have such effects”.

Multiple attempts by the administration to prevent new transgender recruits from enlisting on 1 January were rebuffed in court, including by Ms Kollar-Kotelly.

A Department of Defence official argued that admitting recruits at the start of January would impose “extraordinary burdens on the Department and the military services”.

Rejecting the argument for a delay, Ms Kollar-Kotelly wrote that “with only a brief hiatus, defendants have had the opportunity to prepare for the accession of transgender individuals into the military for nearly one and a half years,” referring to the 2016 directive that initially opened the military to transgender people.