LGBTQ activists welcome decision by a US district court as a victory for transgender rights.

A US federal judge has barred President Donald Trump‘s administration from enforcing plans to exclude transgender people from serving in the country’s armed forces.

Trump had announced the ban in July, stating at the time on Twitter that transgender individuals would not be allowed to serve in the military in “any capacity” partly due to “tremendous medical costs”.

In August, Trump signed a memorandum laying out in more detail the ban, which was supposed to go into effect on March 23, 2018.

But US District Judge Colleen Kollar-Kotelly on Monday ordered a return to the status quo before Trump had announced the policy, since the transgender service members who had sued the US government over the ban were likely to win their case.

BREAKING: Federal judge blocks attempt by President Trump to restrict transgender people from serving in military. pic.twitter.com/eEwedoOM2J — AJ+ (@ajplus) October 30, 2017

Transgender people were allowed to serve in the military by President Barack Obama in June 2016.

According to the National Centre for Transgender Equality, there are about 15,000 transgender people currently serving in the US armed forces.

“Grateful for such a clear, powerful ruling for our plaintiffs: no legitimate reason to treat #transgender service members differently,” Shannon Minter, one of the lawyers working on the case, said on social media later on Monday.

The news was welcomed by many other rights activists and opponents of the ban, who hailed the decision as a victory.

Ryan Thoreson, researcher for LGBTQ rights at Human Rights Watch, congratulated the organisations who led the fight against the ban, calling Trump’s plan “discriminatory”.

GOOD: Federal court immediate halt to President Trump’s trans military ban https://t.co/2QRrweSPYw via @glaad — Ross Murray (@inlayterms) October 30, 2017

Congrats to @NCLRights & @GLADLaw, who just won a preliminary victory against the discriminatory #transban in the military! https://t.co/p0S9y7RZ8Q — Ryan Thoreson (@ryanthoreson) October 30, 2017

The American Civil Liberties Union (ACLU) said federal courts are “recognising what everyone already knows to be true: President Trump’s impulsive #TransBan was blatantly unconstitutional”.

The ACLU said it expected more decisions about the ban to follow.

This is the first decision striking down President Trump’s ban, but it won’t be the last. As all of these cases move forward, we will continue to work to ensure that transgender service members receive the equal treatment they deserve. — ACLU (@ACLU) October 30, 2017

“Today’s preliminary injunction is an important step in the ongoing efforts to protect transgender service members from the dangerous and discriminatory policies of Donald Trump and Mike Pence,” Human Rights Campaign said in an official statement.

In a statement on its official website, LGBTQ media advocacy organisation GLAAD welcomed the blocking of the ban.

“Today’s victory reflects what a majority of Americans have been saying: that transgender service members should be thanked and not relegated to second-class citizenship,” Sarah Kate Ellis, president and chief executive officer of GLAAD, said.

The White House can appeal Monday’s decision.