Human rights groups asked a federal judge Thursday to block President Trump's proposed ban on transgender people serving in the military, producing statements by three former Obama administration U.S. service branch chiefs and a senior Pentagon official that a ban would harm readiness, staffing, recruitment and morale.

The move to stop the Trump administration edict came two days after Defense Secretary Jim Mattis formally responded to Trump's official directive ordering the Pentagon chief to determine how to implement the policy.

In a statement, Shannon Minter, legal director for one of two gay rights organizations representing eight transgender U.S. service members, said their opposition to the "reckless" ban was joined by military experts "who know that ripping trained, experienced service members out of our armed forces — for no reason other than who they are — will leave gaping holes in our defense, compromise national security, and inhibit recruitment during a critical time."

The groups said they sought an injunction now because even though Mattis has not taken action against current service members as the Pentagon reviews its options, he committed to carrying out the Trump policy by March 23. As a result, service members face the imminent prospect of being denied reenlistment, promotions, deployments and even medical care, the groups said.

Mattis also suspended prior plans to permit new transgender enlistees, threatening the careers of transgender students enrolled at the U.S. Naval Academy or in the Reserve Officers' Training Corps, Minter said.

The filing in the lawsuit, by Minter's group, the National Center for Lesbian Rights and GLBTQ Legal Advocates & Defenders (GLAD), came in federal court in the nation's capital.

Justice Department spokeswoman Nicole Navas Oxman said, "We are examining the claims in the motion and conferring within the Government."

Also Thursday, the groups added two named individuals and one unnamed "John Doe" to five original plaintiffs identified by pseudonyms as "Jane Does." They include Regan Kibby, a Naval Academy midshipman, and Dylan Kohere, an ROTC student.

Their participation at the academy and in ROTC is contingent on their eligibility to enlist in the military, now in doubt, they alleged. Each said their initial decision to declare their transgender status was based on the Obama administration's decision to allow their service in 2016.

"A big part of the reason I was comfortable coming out as transgender in the ROTC was the announcement in the summer of 2016 that transgender people would be able to serve openly in the military," Kohere said in an affidavit.

Kibby said he came out as transgender during his first year, when the Obama announcement was made. Kibby competed successfully for a congressional nomination and admission to the academy. Kibby's enrollment was threatened in July, when Trump caught many by surprise with tweets to countermand his predecessor's action.

"After a lifetime of feeling a sense of duty and preparing to serve, reading Trump's tweets was painful, and I saw my future crumbling," Kibby said.

The armed forces were set to begin enlisting transgender people July 1, but Mattis suspended that move.

In affidavits filed Thursday, Obama Pentagon appointees Ray Mabus Jr., Navy secretary from 2009 to 2017; Eric Fanning, who held a series of posts from 2013 to 2017 ending as Army secretary; and Deborah Lee James, Air Force secretary from 2013 to 2017; and Brad Carson, acting undersecretary for personnel and readiness, criticized the Trump proposal.