Get breaking news alerts and special reports. The news and stories that matter, delivered weekday mornings.

WASHINGTON — Three former secretaries of the military services from the Obama administration added their voices Thursday to a lawsuit challenging President Donald Trump's order to bar transgender service members.

They weighed in on behalf of eight servicemembers who claim the order amounts to unconstitutional discrimination. The three are former Army secretary Eric Fanning, former Navy secretary Raymond Mabus Jr. and former Air Force secretary Deborah Lee James.

All three submitted declarations saying that a Pentagon group looked at the transgender issue in 2015 and concluded that "transgender people should be permitted to serve openly" in the armed forces and that banning them would require "the discharge of highly trained and experienced service members, causing unexpected vacancies in operations units, and requiring the expensive and time-consuming recruitment and training of replacement personnel."

Let our news meet your inbox. The news and stories that matters, delivered weekday mornings. This site is protected by recaptcha

Their statements came in a motion seeking an immediate stop to enforcing the transgender ban. It was filed by the National Center for Lesbian Rights and GLBTQ Legal Advocates and Defenders.

"Ripping trained, experienced servicemembers out of our armed forces — for no reason other that who they are — will leave gaping holes in our defense," said NCLR's Shannon Minter.

"These plaintiffs are dedicated professionals who simply wish to be treated the same. They meet the same standards, do the same work and want nothing more than the chance to continue serving our country," he added.

Defense Secretary James Mattis said August 29 that for now, the current policy remains in effect while the Pentagon studies how to carry out the president's order while promoting military readiness and unit cohesion.

Mattis denied Thursday that he was resisting the president's order by calling for the study. "He wouldn’t have given me the time if it didn’t need some kind of review," he said.

“So on the one hand you want as many Americans to serve as possible and on the other hand, effectiveness and lethality and deploy-ability of the military. Those bookends exist."

Once the recommendations of the study panel are offered, Mattis said he would advise the president on how to carry out the transgender ban. "He’s told me what he wanted in theory, in broad terms, and now he’s leaving it up to me."

In addition to six unnamed plaintiffs, the lawsuit was brought on behalf of Regan Kibby, a midshipman at the U.S. Naval Academy, and Dylan Kohere, an ROTC student at the University of New Haven.

The president's ban "ruins transgender servicemembers lives," Kibby said, "for no reason other than who they are."