SAN FRANCISCO (CBS SF) — Monday’s federal court ruling blocking President Donald Trump’s ban on transgender people in the military was hailed by a San Francisco civil rights lawyer who worked on the case.

“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,” said Shannon Minter, legal director of the National Center for Lesbian Rights.

“We are grateful to the court for recognizing the gravity of these issues and putting a stop to this dangerous policy, which has wreaked havoc in the lives of transgender service members and their families,” Minter said in a statement.

The San Francisco-based National Center for Lesbian Rights and Boston-based GLBTQ Legal Advocates & Defenders, or GLAD, were co-counsel in a lawsuit challenging the ban. Several lawyers from private law firms also participated.

The lawsuit was filed in federal court in Washington, D.C., in August on behalf of five unidentified “Jane Doe” transgender service members and later joined by one “John Doe” soldier and two transgender male students who hope to join the military.

The ban was announced in a tweet by Trump on July 26 and later outlined in detail in an Aug. 25 memorandum directing service secretaries to authorize the discharge of transgender individuals by March 23.

U.S. District Judge Colleen Kollar-Kotelly of Washington, D.C., issued a preliminary injunction Monday blocking the ban until a full trial is held on the lawsuit.

Kollar-Kotelly said the plaintiffs had showed they were likely to win their claim that they were denied the constitutional guarantee of equal treatment. The reasons given for the president’s directives “do not appear to be supported by any facts,” the judge wrote.

The plaintiffs claim the directives were driven by a desire to show disapproval of transgender people and were not genuinely based on the military effectiveness and budget concerns cited by Trump.

The decision could be appealed.

U.S. Justice Department spokeswoman Lauren Ehrsam said, “We disagree with the court’s ruling and are currently evaluating the next steps.”

Kollar-Kotelly dismissed another part of the lawsuit in which the plaintiffs challenged Trump’s ban on sex reassignment surgery for service members. She said none of the plaintiffs had shown they would be personally affected by that directive.

State Senator Scott Wiener called the main part of the ruling “a victory for justice.”

“Trump’s ill-informed, bigoted attack on transgender soldiers will not make our country stronger or safer. This ruling is great news for our country and for the brave trans patriots who put their lives on the line for us,” Wiener said in a statement.

In another LGBTQ case Monday, Santa Clara County together with the cities of Los Angeles and New York led a coalition of 70 counties and cities in filing a friend-of-the-court brief urging the U.S. Supreme Court not to allow a Colorado bakery to refuse to make a wedding cake for a same-sex couple.

The counties and cities said, “Maintaining the inclusiveness of our communities requires that public accommodations be open to everyone.”

In addition to Santa Clara County, Bay Area cities and counties joining in the brief include San Francisco, Oakland and Berkeley and Alameda, Marin, San Mateo and Santa Cruz counties.

Separately, California Attorney General Xavier Becerra joined the attorneys general of 19 other states and the District of Columbia in another friend-of-the-court brief supporting the same-sex couple.

TM and © Copyright 2017 CBS Radio Inc. and its relevant subsidiaries. CBS RADIO and EYE Logo TM and Copyright 2017 CBS Broadcasting Inc. Used under license. All Rights Reserved. This material may not be published, broadcast, rewritten, or redistributed. Bay City News Service contributed to this report.