Two national LGBT legal groups filed a lawsuit Wednesday in federal district court in Washington, D.C., seeking a preliminary injunction to stop President Trump from implementing his proposed ban on transgender service members. It also seeks a declaration from the court that the proposed ban is unconstitutional.

The Boston-based GLBTQ Legal Advocates & Defenders and the San Francisco-based National Center for Lesbian Rights filed the lawsuit, with the assistance of two major national law firms –Wilmer Cutler and Foley Hoag.

Shannon Minter, legal director for NCLR, issued a statement saying that President Trump’s transgender ban directive “has created a tidal wave of harms that have already been felt throughout our armed services.”

“Transgender service members have been blindsided by this shift,” said Minter, “and are scrambling to deal with what it means for their futures and their families.”

Jennifer Levi, GLAD’s transgender rights project director, said the policy affects over 15,000 servicemembers.

President Trump issued Twitter posts on July 26, saying that the U.S. military would no longer permit transgender people from serving in the military “in any capacity.”

The lawsuit, Jane Doe v Trump, asks the court to prevent the Trump administration from enforcing the ban, saying a reinstatement of the ban against transgender people violates the U.S. Constitutional guarantees of equal protection of the law and due process.

“The categorical exclusion of transgender people from the military service lacks a rational basis, is arbitrary, and cannot be justified by sufficient federal interests,” states the lawsuit.

There was considerable political pushback after President Trump issued his Twitter posts announcing his plan to ban transgender service members. Although no general was ever identified as having been consulted, the Twitter posts said, “After consultation with my Generals and military experts, please be advised that the United States Government will not accept or allow…Transgender individuals to serve in any capacity in the U.S. Military. Our military must be focused on decisive and overwhelming…victory and cannot be burdened with the tremendous medical costs and disruption that transgender in the military would entail. Thank you.”

General Joseph Dunford, chairman of the Joint Chiefs of Staff, issued a statement to military personnel, saying, “There will be no modifications to the current policy until the president’s direction has been received by the secretary of defense and the secretary has issued implementation guidance. In the meantime, we will continue to treat all of our personnel with respect.” And 56 former generals and admirals issued a statement opposing the proposed new policy.

According to the lawsuit, the White House counsel’s office subsequently communicated President Trump’s decision “into official guidance” to the Department of Defense, along with a plan outline for implementing it.

The lawsuit represents five service members, identified as Jane Doe 1-5. One has served in the Coast Guard for 10 years, three are serving in the U.S. Army, and one Air Force.

NCLR’s Minter explained that the attorneys expect to add plaintiffs but had to file the lawsuit quickly after learning, just last Friday, that President Trump had conveyed his directive to the Department of Defense in a formal way.

“We are moving as quickly as possible to stop any attempt to reinstate the ban,” said Minter.

Under President Obama, the Department of Defense issued a regulation in June 2016 to explicitly allow transgender persons to serve openly in the military.