A federal judge in Washington DC has blocked Donald Trump’s attempt to prohibit transgender Americans from serving in the military.

Mr Trump in August signed an executive order banning transgender people from serving openly, reversing Barack Obama’s directive allowing them to do so. The move prompted a flood of lawsuits, many of them filed on behalf of transgender service members or veterans.

Now one of those legal challenges has borne fruit. United States District Judge Colleen Kollar-Kotelly sided in part with a group of transgender servicemembers who sued to block the change, halting Mr Trump’s ban on service but upholding the President’s move to block the military from paying for gender reassignment surgery.

“This is a complete victory for our plaintiffs and all transgender service members, who are now once again able to serve on equal terms and without the threat of being discharged”, National Center for Lesbian Rights Legal Director Shannon Minter, whose organisation filed the lawsuit, said in a statement. “We are grateful to the court for issuing such a clear, powerful decision recognizing that there is no legitimate reason for treating qualified transgender service members differently than others”.

The prohibition was already effectively on hold while Secretary of Defense James Mattis convened a panel of experts to examine the implications of reinstating the ban, a move Mr Mattis said in August would mean “current policy with respect to currently serving members will remain in place”.

A 2016 study conducted by the RAND Corporation at the Obama administration’s behest concluded that allowing transgender people to serve would have “minimal impact” on troop readiness. It also suggested that the cost of covering gender-transition related healthcare would be negligible, amounting to between $2.4 million and $8.4 million annually.

But Ms Kollar-Kotelly’s decision shows Mr Trump is on the contested legal ground regardless of the outcome of the expert analysis.

In her opinion, the judge wrote that transgender troops had a reasonable claim to their 5th Amendment rights being violated because Mr Trump’s directive affects them as a “class of historically persecuted and politically powerless individuals”.

She also questioned the reasoning behind Mr Trump’s orders, writing that it “the reasons given for them do not appear to be supported by any facts” and cited “the recent rejection of those reasons by the military itself”. She appeared sceptical of “the unusual circumstances surrounding the President’s announcement of them”, an apparent reference to Mr Trump initially announcing his intention on Twitter – a move that reportedly surprised top military officials.